git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] merge-one-file and GIT_WORK_TREE
@ 2011-04-28 22:38 Jeff King
  2011-04-28 22:41 ` [PATCH 2/2] merge-one-file: fix broken merges with GIT_WORK_TREE Jeff King
  0 siblings, 1 reply; 6+ messages in thread
From: Jeff King @ 2011-04-28 22:38 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Aman Gupta, git

[argh, resend, actually remembering to cc the list this time]

At GitHub, we're using read-tree, merge-index, and merge-one-file to do
trivial content-level merges from bare repositories (without having to
check out the entire repository contents each time).

However, we noticed a bug in git-merge-one-file when used with
GIT_WORK_TREE; it can silently create bogus results that ignore the
"theirs" side of files needing content-level merging.

The problem is that merge-one-file simply assumes it is in the root of
the working tree without any checking.  The only two places we use
merge-one-file in git itself are in the octopus and resolve strategies.
I think normal use is fine, because "git merge" will have changed to the
toplevel of the worktree already.

So I doubt anybody else is being affected by this. But we do expose the
commands for general use, with no disclaimer or check on the working
tree status or location. And the resulting bogus merge is a nasty
surprise.

  [1/2]: add tests for merge-index / merge-one-file
  [2/2]: merge-one-file: fix broken merges with GIT_WORK_TREE

-Peff

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

end of thread, other threads:[~2011-04-29 22:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <BANLkTimoehqY9ViF7AkQC3YU8e4Sq-OT_w@mail.gmail.com>
2011-04-29 18:52 ` [PATCH 2/2] merge-one-file: fix broken merges with GIT_WORK_TREE Jeff King
2011-04-29 22:23   ` [PATCHv2 1/2] add tests for merge-index / merge-one-file Jeff King
2011-04-29 22:24   ` [PATCHv2 2/2] merge-one-file: fix broken merges with alternate work trees Jeff King
2011-04-29 22:41     ` Junio C Hamano
2011-04-29 22:46       ` Jeff King
2011-04-28 22:38 [PATCH 0/2] merge-one-file and GIT_WORK_TREE Jeff King
2011-04-28 22:41 ` [PATCH 2/2] merge-one-file: fix broken merges with GIT_WORK_TREE Jeff King

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