diff options
author | Jeff King <peff@peff.net> | 2023-11-09 08:26:28 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-11-09 11:07:54 +0100 |
commit | e02039167371a842a12cc571582c089c287e7233 (patch) | |
tree | 3c0a20966116ffaea4a7ba631e6e72be0ccc2d81 /commit-graph.c | |
parent | commit-graph: drop verify_commit_graph_lite() (diff) | |
download | git-e02039167371a842a12cc571582c089c287e7233.tar.xz git-e02039167371a842a12cc571582c089c287e7233.zip |
commit-graph: mark chunk error messages for translation
The patches from f32af12cee (Merge branch 'jk/chunk-bounds', 2023-10-23)
added many new untranslated error messages. While it's unlikely for most
users to see these messages at all, most of the other commit-graph error
messages are translated (and likewise for the matching midx messages).
Let's mark them all for consistency (and to help any poor unfortunate
user who does manage to find a broken graph file).
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit-graph.c')
-rw-r--r-- | commit-graph.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/commit-graph.c b/commit-graph.c index 081de1e6e1..4295ad70cd 100644 --- a/commit-graph.c +++ b/commit-graph.c @@ -282,7 +282,7 @@ static int graph_read_oid_fanout(const unsigned char *chunk_start, int i; if (chunk_size != 256 * sizeof(uint32_t)) - return error("commit-graph oid fanout chunk is wrong size"); + return error(_("commit-graph oid fanout chunk is wrong size")); g->chunk_oid_fanout = (const uint32_t *)chunk_start; g->num_commits = ntohl(g->chunk_oid_fanout[255]); @@ -291,7 +291,7 @@ static int graph_read_oid_fanout(const unsigned char *chunk_start, uint32_t oid_fanout2 = ntohl(g->chunk_oid_fanout[i + 1]); if (oid_fanout1 > oid_fanout2) { - error("commit-graph fanout values out of order"); + error(_("commit-graph fanout values out of order")); return 1; } } @@ -314,7 +314,7 @@ static int graph_read_commit_data(const unsigned char *chunk_start, { struct commit_graph *g = data; if (chunk_size / GRAPH_DATA_WIDTH != g->num_commits) - return error("commit-graph commit data chunk is wrong size"); + return error(_("commit-graph commit data chunk is wrong size")); g->chunk_commit_data = chunk_start; return 0; } @@ -324,7 +324,7 @@ static int graph_read_generation_data(const unsigned char *chunk_start, { struct commit_graph *g = data; if (chunk_size / sizeof(uint32_t) != g->num_commits) - return error("commit-graph generations chunk is wrong size"); + return error(_("commit-graph generations chunk is wrong size")); g->chunk_generation_data = chunk_start; return 0; } @@ -334,7 +334,7 @@ static int graph_read_bloom_index(const unsigned char *chunk_start, { struct commit_graph *g = data; if (chunk_size / 4 != g->num_commits) { - warning("commit-graph changed-path index chunk is too small"); + warning(_("commit-graph changed-path index chunk is too small")); return -1; } g->chunk_bloom_indexes = chunk_start; @@ -348,8 +348,8 @@ static int graph_read_bloom_data(const unsigned char *chunk_start, uint32_t hash_version; if (chunk_size < BLOOMDATA_CHUNK_HEADER_SIZE) { - warning("ignoring too-small changed-path chunk" - " (%"PRIuMAX" < %"PRIuMAX") in commit-graph file", + warning(_("ignoring too-small changed-path chunk" + " (%"PRIuMAX" < %"PRIuMAX") in commit-graph file"), (uintmax_t)chunk_size, (uintmax_t)BLOOMDATA_CHUNK_HEADER_SIZE); return -1; @@ -605,7 +605,7 @@ int open_commit_graph_chain(const char *chain_file, /* treat empty files the same as missing */ errno = ENOENT; } else { - warning("commit-graph chain file too small"); + warning(_("commit-graph chain file too small")); errno = EINVAL; } return 0; @@ -953,7 +953,7 @@ static int fill_commit_in_graph(struct repository *r, parent_data_pos = edge_value & GRAPH_EDGE_LAST_MASK; do { if (g->chunk_extra_edges_size / sizeof(uint32_t) <= parent_data_pos) { - error("commit-graph extra-edges pointer out of bounds"); + error(_("commit-graph extra-edges pointer out of bounds")); free_commit_list(item->parents); item->parents = NULL; item->object.parsed = 0; |