All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: [PATCH] Refresh the index before starting merge-recursive.
Date: Sun, 31 Dec 2006 00:02:13 -0500	[thread overview]
Message-ID: <20061231050213.GA6008@spearce.org> (raw)

Since merge-recursive won't perform a refresh of stale stat data on
its own we need to make sure we run `update-index --refresh` prior
to starting it, otherwise stale stat data may cause an otherwise
valid merge to fail.

This was simply a thinko on my part when I reorganized this section
of code.  Silly copy and paste error and all....

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
---

 Applies to the top of my sp/merge topic.

 git-merge.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/git-merge.sh b/git-merge.sh
index 922c5b8..ced5524 100755
--- a/git-merge.sh
+++ b/git-merge.sh
@@ -296,6 +296,7 @@ f,*)
 ?,1,*,)
 	# We are not doing octopus, not fast forward, and have only
 	# one common.  See if it is really trivial.
+	git-update-index --refresh 2>/dev/null
 	case "$use_strategies" in
 	recursive|'recursive '|recur|'recur ')
 		: run merge later
@@ -303,7 +304,6 @@ f,*)
 	*)
 		git var GIT_COMMITTER_IDENT >/dev/null || exit
 		echo "Trying really trivial in-index merge..."
-		git-update-index --refresh 2>/dev/null
 		if git-read-tree --trivial -m -u -v $common $head "$1" &&
 		   result_tree=$(git-write-tree)
 		then
-- 
1.5.0.rc0.g6bb1

                 reply	other threads:[~2006-12-31  5:02 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=20061231050213.GA6008@spearce.org \
    --to=spearce@spearce.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.