git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC/PATCH] stash: Delete MERGE_RR before stash apply
@ 2012-07-05 13:48 Phil Hord
  2012-07-05 17:15 ` Junio C Hamano
  0 siblings, 1 reply; 13+ messages in thread
From: Phil Hord @ 2012-07-05 13:48 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: David Aguilar, git, martin.von.zweigbergk, tytso

The presence of a GIT_DIR/MERGE_RR file indicates we
were resolving a merge which had rerere candidates for
recording.  But the file does not get deleted after
all resolutions are completed.  This is ok for most
cases because the file will get replaced when the
next merge happens.  But stash apply does not use
a merge that supports rerere, and so the old
MERGE_RR does not get replaced with a current one.

This then confuses mergetool who thinks a rerere
operation is in play when it is not.

Fix this by ensuring there is no leftover
MERGE_RR file whenever we are beginning a git stash
apply.

Signed-off-by: Phil Hord <hordp@cisco.com>
---

This feels like a hack and like it is in the wrong location.
However, the change is minimal and should fix my
specific problem[1].

[1] http://comments.gmane.org/gmane.comp.version-control.git/200178

 git-stash.sh | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/git-stash.sh b/git-stash.sh
index 4e2c7f8..0b96e2f 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -409,6 +409,9 @@ apply_stash () {

        assert_stash_like "$@"

+       test -f "$GIT_DIR/MERGE_RR" &&
+               git rerere clear
+
        git update-index -q --refresh || die "$(gettext "unable to
refresh index")"

        # current index state
-- 
1.7.11.1.161.g0f17059.dirty

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2012-08-17 18:02 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-05 13:48 [RFC/PATCH] stash: Delete MERGE_RR before stash apply Phil Hord
2012-07-05 17:15 ` Junio C Hamano
2012-07-06 15:53   ` Phil Hord
2012-07-06 20:01     ` Junio C Hamano
2012-07-06 23:18       ` Phil Hord
2012-07-07 20:46         ` [PATCH v2 0/2] stash: invoke rerere in case of conflict Phil Hord
2012-07-07 20:46           ` [PATCH v2 1/2] test: git-stash conflict sets up rerere Phil Hord
2012-07-09  2:37             ` Junio C Hamano
2012-07-09 14:41               ` Phil Hord
2012-08-16 22:00                 ` Junio C Hamano
2012-08-17 17:52                   ` Phil Hord
2012-08-17 18:02                     ` Junio C Hamano
2012-07-07 20:46           ` [PATCH v2 2/2] stash: invoke rerere in case of conflict Phil Hord

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).