summaryrefslogtreecommitdiff
path: root/merge-recursive.c
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2016-07-26 18:05:50 +0200
committerJunio C Hamano <gitster@pobox.com>2016-07-26 11:13:44 -0700
commitef1177d18e35c030c37aa533002a11d98361e6b9 (patch)
tree90eb1a0e29d7b42049662d43066269764c5a768c /merge-recursive.c
parent3be18b47e4249a3e3f8ae9968abffc954c7e293a (diff)
downloadgit-ef1177d18e35c030c37aa533002a11d98361e6b9.tar.gz
die("bug"): report bugs consistently
The vast majority of error messages in Git's source code which report a bug use the convention to prefix the message with "BUG:". As part of cleaning up merge-recursive to stop die()ing except in case of detected bugs, let's just make the remainder of the bug reports consistent with the de facto rule. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'merge-recursive.c')
-rw-r--r--merge-recursive.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/merge-recursive.c b/merge-recursive.c
index a4a1195f61..4338b73ec4 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -268,7 +268,7 @@ struct tree *write_tree_from_memory(struct merge_options *o)
fprintf(stderr, "BUG: %d %.*s\n", ce_stage(ce),
(int)ce_namelen(ce), ce->name);
}
- die("Bug in merge-recursive.c");
+ die("BUG: unmerged index entries in merge-recursive.c");
}
if (!active_cache_tree)
@@ -966,9 +966,8 @@ static struct merge_file_info merge_file_1(struct merge_options *o,
if (!oid_eq(&a->oid, &b->oid))
result.clean = 0;
- } else {
- die(_("unsupported object type in the tree"));
- }
+ } else
+ die(_("BUG: unsupported object type in the tree"));
}
return result;
@@ -1354,7 +1353,7 @@ static int process_renames(struct merge_options *o,
const char *ren2_dst = ren2->pair->two->path;
enum rename_type rename_type;
if (strcmp(ren1_src, ren2_src) != 0)
- die("ren1_src != ren2_src");
+ die("BUG: ren1_src != ren2_src");
ren2->dst_entry->processed = 1;
ren2->processed = 1;
if (strcmp(ren1_dst, ren2_dst) != 0) {
@@ -1388,7 +1387,7 @@ static int process_renames(struct merge_options *o,
ren2 = lookup->util;
ren2_dst = ren2->pair->two->path;
if (strcmp(ren1_dst, ren2_dst) != 0)
- die("ren1_dst != ren2_dst");
+ die("BUG: ren1_dst != ren2_dst");
clean_merge = 0;
ren2->processed = 1;
@@ -1812,7 +1811,7 @@ static int process_entry(struct merge_options *o,
*/
remove_file(o, 1, path, !a_mode);
} else
- die(_("Fatal merge failure, shouldn't happen."));
+ die(_("BUG: fatal merge failure, shouldn't happen."));
return clean_merge;
}
@@ -1870,7 +1869,7 @@ int merge_trees(struct merge_options *o,
for (i = 0; i < entries->nr; i++) {
struct stage_data *e = entries->items[i].util;
if (!e->processed)
- die(_("Unprocessed path??? %s"),
+ die(_("BUG: unprocessed path??? %s"),
entries->items[i].string);
}