Git development
 help / color / mirror / Atom feed
From: Matthieu Moy <Matthieu.Moy@imag.fr>
To: git@vger.kernel.org
Cc: Matthieu Moy <Matthieu.Moy@imag.fr>
Subject: [PATCH 1/2] merge-recursive: point the user to commit when file would be overwritten.
Date: Fri, 20 Nov 2009 16:59:26 +0100	[thread overview]
Message-ID: <1258732767-12741-2-git-send-email-Matthieu.Moy@imag.fr> (raw)
In-Reply-To: <1258732767-12741-1-git-send-email-Matthieu.Moy@imag.fr>

The commit-before-pull is well accepted in the DVCS community, but is
confusing some new users. This should get them back in the right way when
the problem occurs.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
 merge-recursive.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/merge-recursive.c b/merge-recursive.c
index f55b7eb..d5e0819 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -172,9 +172,11 @@ static int git_merge_trees(int index_only,
 	struct unpack_trees_options opts;
 	static const struct unpack_trees_error_msgs msgs = {
 		/* would_overwrite */
-		"Your local changes to '%s' would be overwritten by merge.  Aborting.",
+		"Your local changes to '%s' would be overwritten by merge.  Aborting:\n"
+		"Please, commit your changes or stash them before you can merge.",
 		/* not_uptodate_file */
-		"Your local changes to '%s' would be overwritten by merge.  Aborting.",
+		"Your local changes to '%s' would be overwritten by merge.  Aborting:\n"
+		"Please, commit your changes or stash them before you can merge.",
 		/* not_uptodate_dir */
 		"Updating '%s' would lose untracked files in it.  Aborting.",
 		/* would_lose_untracked */
-- 
1.6.5.3.435.g5f2e3.dirty

  reply	other threads:[~2009-11-20 16:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-20 15:59 [RFC/PATCH 0/2] Explain newbies the "commit before pull" flow Matthieu Moy
2009-11-20 15:59 ` Matthieu Moy [this message]
2009-11-20 18:05   ` [PATCH 1/2] merge-recursive: point the user to commit when file would be overwritten Junio C Hamano
2009-11-22 22:09     ` Matthieu Moy
2009-11-20 15:59 ` [PATCH 2/2] user-manual: Document that "git merge" doesn't like uncommited changes Matthieu Moy
2009-11-20 20:19   ` Junio C Hamano
2009-11-22 22:18     ` Matthieu Moy
2009-11-22 23:57       ` Junio C Hamano
2009-11-23  7:51         ` Matthieu Moy
2009-11-22 22:26 ` [PATCH 1/2 v2] merge-recursive: point the user to commit when file would be overwritten Matthieu Moy
2009-11-22 22:26 ` [PATCH 2/2 v2] user-manual: Document that "git merge" doesn't like uncommited changes Matthieu Moy
2009-11-23  0:08   ` Junio C Hamano

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=1258732767-12741-2-git-send-email-Matthieu.Moy@imag.fr \
    --to=matthieu.moy@imag.fr \
    --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