git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] detecting delete/modechange conflicts
@ 2015-10-26 21:35 Jeff King
  2015-10-26 21:36 ` [PATCH 1/3] t6031: move triple-rename test to t3030 Jeff King
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Jeff King @ 2015-10-26 21:35 UTC (permalink / raw)
  To: git

I was surprised to find that:

  # base commit
  echo base >file &&
  git add file &&
  git commit -m base &&

  # one side changes mode
  chmod +x file &&
  git commit -am executable &&

  # the other deletes the file
  git checkout -b other HEAD^ &&
  git rm file &&
  git commit -am removed &&

  git merge master

silently completes the merge, dropping the mode change. We detect
delete/modify conflicts, but not delete/modechange conflicts.  The
trivial index merge does catch it, but both the resolve and recursive
strategies resolve it silently in favor of the deletion.

After looking through the history and the list archive, I don't _think_
this was intentional, and we simply missed the case in both places. But
maybe somebody else knows something I don't. It seems like we should be
punting to the user under the general principle of stupid and safe
merges.

  [1/3]: t6031: move triple-rename test to t3030
  [2/3]: t6031: generalize for recursive and resolve strategies
  [3/3]: merge: detect delete/modechange conflict

-Peff

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

end of thread, other threads:[~2015-10-26 21:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-26 21:35 [PATCH 0/3] detecting delete/modechange conflicts Jeff King
2015-10-26 21:36 ` [PATCH 1/3] t6031: move triple-rename test to t3030 Jeff King
2015-10-26 21:37 ` [PATCH 2/3] t6031: generalize for recursive and resolve strategies Jeff King
2015-10-26 21:39 ` [PATCH 3/3] merge: detect delete/modechange conflict Jeff King
2015-10-26 21:46 ` [PATCH 0/3] detecting delete/modechange conflicts Junio C Hamano
2015-10-26 21:54   ` 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).