{"thread":{"id":"15706","subject":"[PATCH] Clarify commit error message for unmerged files","startedAt":"2008-09-29T16:04:41Z","lastAt":"2008-09-29T16:04:41Z","messageCount":1,"participants":["Rafael Garcia-Suarez"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"91856","messageId":"1222704281-10194-1-git-send-email-rgarciasuarez@gmail.com","threadId":"15706","inReplyTo":null,"subject":"[PATCH] Clarify commit error message for unmerged files","fromName":"Rafael Garcia-Suarez","fromEmail":"rgarciasuarez@gmail.com","sentAt":"2008-09-29T16:04:41Z","receivedAt":"2008-09-29T16:04:41Z","isPatch":true,"sender":{"key":"rgarciasuarez@gmail.com","avatar":null},"body":"Currently, trying to use git-commit with unmerged files in the index\nwill show the message \"Error building trees\", which can be a bit\nobscure to the end user. This patch makes the error message clearer, and\nconsistent with what git-write-tree reports in a similar situation.\n\nSigned-off-by: Rafael Garcia-Suarez <rgarciasuarez@gmail.com>\n---\n builtin-commit.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/builtin-commit.c b/builtin-commit.c\nindex 8165bb3..6b23143 100644\n--- a/builtin-commit.c\n+++ b/builtin-commit.c\n@@ -639,7 +639,7 @@ static int prepare_to_commit(const char *index_file, const char *prefix)\n \t\tactive_cache_tree = cache_tree();\n \tif (cache_tree_update(active_cache_tree,\n \t\t\t      active_cache, active_nr, 0, 0) < 0) {\n-\t\terror(\"Error building trees\");\n+\t\terror(\"Error building trees; the index is unmerged?\");\n \t\treturn 0;\n \t}\n \n-- \n1.6.0.2.307.gc4275.dirty\n"}]}