git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git-new-workdir should not share .git/rr-cache/MERGE_RR
@ 2008-07-12 11:27 Kalle Olavi Niemitalo
  2008-07-12 14:56 ` [PATCH 1/2] Move MERGE_RR from .git/rr-cache/ into .git/ Johannes Schindelin
  0 siblings, 1 reply; 5+ messages in thread
From: Kalle Olavi Niemitalo @ 2008-07-12 11:27 UTC (permalink / raw)
  To: git

The contrib/workdir/git-new-workdir script makes .git/rr-cache in
each workdir a symlink to the shared .git/rr-cache directory.
This lets git-rerere share conflict resolutions between workdirs.
However, that directory also contains .git/rr-cache/MERGE_RR,
which lists the files for which conflict resolutions should be
saved in the next commit.  It is thus possible that git-merge in
one workdir records conflicts to the shared MERGE_RR file, and
git-commit in another workdir saves the staged files to rr-cache
as conflict resolutions, even though those files are from a
different branch and never saw the merge.  Such invalid conflict
resolutions need then be separately deleted.  This happened to
me, with git version 1.5.6.

I don't see any way to modify the symlinks made by
git-new-workdir so that new SHA-1 directories in .git/rr-cache
would be shared but .git/rr-cache/MERGE_RR would not.  On IRC,
"gitte" suggested changing Git to use $GIT_DIR/MERGE_RR instead
of $GIT_DIR/rr-cache/MERGE_RR.  I suppose compatibility with
people's existing repositories would require the modified Git to
keep reading $GIT_DIR/rr-cache/MERGE_RR too, so that Git could be
painlessly upgraded during a merge, but it is not obvious to me
how lock files should then work.

Alternatively, the SHA-1 directories in .git/rr-cache could be
moved to a subdirectory; then git-new-workdir could be changed to
symlink only that subdirectory.

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

end of thread, other threads:[~2008-07-13  8:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-12 11:27 git-new-workdir should not share .git/rr-cache/MERGE_RR Kalle Olavi Niemitalo
2008-07-12 14:56 ` [PATCH 1/2] Move MERGE_RR from .git/rr-cache/ into .git/ Johannes Schindelin
2008-07-12 14:56   ` [PATCH 2/2 (for GIT-GUI)] git-gui: MERGE_RR lives in .git/ directly with newer Git versions Johannes Schindelin
2008-07-13  1:16     ` Shawn O. Pearce
2008-07-13  8:58       ` Junio C Hamano

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