git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rafael Garcia-Suarez <rgarciasuarez@gmail.com>
To: git@vger.kernel.org
Cc: Rafael Garcia-Suarez <rgarciasuarez@gmail.com>
Subject: [PATCH] Clarify commit error message for unmerged files
Date: Mon, 29 Sep 2008 18:04:41 +0200	[thread overview]
Message-ID: <1222704281-10194-1-git-send-email-rgarciasuarez@gmail.com> (raw)

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>
---
 builtin-commit.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/builtin-commit.c b/builtin-commit.c
index 8165bb3..6b23143 100644
--- a/builtin-commit.c
+++ b/builtin-commit.c
@@ -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;
 	}
 
-- 
1.6.0.2.307.gc4275.dirty

                 reply	other threads:[~2008-09-29 16:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1222704281-10194-1-git-send-email-rgarciasuarez@gmail.com \
    --to=rgarciasuarez@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).