Skip to content

Commit cbce6c0

Browse files
rgsspearce
authored andcommitted
Clarify commit error message for unmerged files
Currently, trying to use git-commit with unmerged files in the index will show the message "Error building trees", which can be a bit obscure to the end user. This patch makes the error message clearer, and consistent with what git-write-tree reports in a similar situation. Signed-off-by: Rafael Garcia-Suarez <rgarciasuarez@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
1 parent 94e02e7 commit cbce6c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin-commit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ static int prepare_to_commit(const char *index_file, const char *prefix)
639639
active_cache_tree = cache_tree();
640640
if (cache_tree_update(active_cache_tree,
641641
active_cache, active_nr, 0, 0) < 0) {
642-
error("Error building trees");
642+
error("Error building trees; the index is unmerged?");
643643
return 0;
644644
}
645645

0 commit comments

Comments
 (0)