Skip to content

Commit

Permalink
Clarify commit error message for unmerged files
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rafael Garcia-Suarez authored and Shawn O. Pearce committed Sep 29, 2008
1 parent 94e02e7 commit cbce6c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builtin-commit.c
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ static int prepare_to_commit(const char *index_file, const char *prefix)
active_cache_tree = cache_tree();
if (cache_tree_update(active_cache_tree,
active_cache, active_nr, 0, 0) < 0) {
error("Error building trees");
error("Error building trees; the index is unmerged?");
return 0;
}

Expand Down

0 comments on commit cbce6c0

Please sign in to comment.