git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Santi Béjar" <sbejar@gmail.com>
To: Dmitry Torokhov <dtor@insightbb.com>
Cc: Git Mailing List <git@vger.kernel.org>, Junio C Hamano <junkio@cox.net>
Subject: Re: Merging on a dirty tree???
Date: Fri, 16 Mar 2007 11:46:09 +0100	[thread overview]
Message-ID: <87slc54gb2.fsf@gmail.com> (raw)
In-Reply-To: <200703152359.53543.dtor@insightbb.com> (Dmitry Torokhov's message of "Thu, 15 Mar 2007 23:59:53 -0400")

Dmitry Torokhov <dtor@insightbb.com> writes:

> Hi,
>
> I just tried to pull from Linus' tree into my local tree and it seems
> that fast forward was committed even though the tree was dirty:

[...]

>  19 files changed, 211 insertions(+), 80 deletions(-)
> [dtor@anvil work]$ git --version
> git version 1.5.0.3.438.gc49b2
>
> It used to refuse merge if there were conflicts...

Try with this patch.

Santi

-- >8 --
From: "Santi Béjar" <sbejar@gmail.com>
Subject: [PATCH] git-merge: finish when git-read-tree fails

The message formating (commit v1.5.0.3-28-gbe242d5) broke the && chain.

Noticed by Dmitry Torokhov.

Signed-off-by: Santi Béjar <sbejar@gmail.com>
---
 git-merge.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/git-merge.sh b/git-merge.sh
index 6ce62c8..8759c5a 100755
--- a/git-merge.sh
+++ b/git-merge.sh
@@ -292,13 +292,13 @@ f,*)
 	# Again the most common case of merging one remote.
 	echo "Updating $(git-rev-parse --short $head)..$(git-rev-parse --short $1)"
 	git-update-index --refresh 2>/dev/null
-	new_head=$(git-rev-parse --verify "$1^0") &&
-	git-read-tree -v -m -u --exclude-per-directory=.gitignore $head "$new_head" &&
 	msg="Fast forward"
 	if test -n "$have_message"
 	then
 		msg="$msg (no commit created; -m option ignored)"
 	fi
+	new_head=$(git-rev-parse --verify "$1^0") &&
+	git-read-tree -v -m -u --exclude-per-directory=.gitignore $head "$new_head" &&
 	finish "$new_head" "$msg" || exit
 	dropsave
 	exit 0
-- 
1.5.0.4.1010.g688e

  reply	other threads:[~2007-03-16 10:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-16  3:59 Merging on a dirty tree??? Dmitry Torokhov
2007-03-16 10:46 ` Santi Béjar [this message]
2007-03-16 10:53   ` 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=87slc54gb2.fsf@gmail.com \
    --to=sbejar@gmail.com \
    --cc=dtor@insightbb.com \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    /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).