Code

Clarify commit error message for unmerged files
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Mon, 29 Sep 2008 16:04:41 +0000 (18:04 +0200)
committerShawn O. Pearce <spearce@spearce.org>
Mon, 29 Sep 2008 16:13:20 +0000 (09:13 -0700)
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>
builtin-commit.c

index c870037b07ca00aeeeb369fdae98c9b828be0af2..e2a7e48b1ce97a74ef73a1feb53a9b9248cf8668 100644 (file)
@@ -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;
        }