git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Merge with local conflicts in new files
@ 2006-05-16 22:00 Santi
  2006-05-16 22:12 ` Santi
  2006-05-16 22:40 ` Junio C Hamano
  0 siblings, 2 replies; 10+ messages in thread
From: Santi @ 2006-05-16 22:00 UTC (permalink / raw)
  To: git, Junio C Hamano

Hi *,

       In the case of:

- You merge from a branch with new files
- You have these files in the working directory
- You do not have these files in the HEAD.

   The end result is that you lose the content of these files.

   So an additional check for the merge is to check for these dirty
but not in HEAD files.

   Here is a test that reproduce it. I expect the merge to fail and
with the content of foo being bar.

test_description='Test merge with local conflicts in new files'
. ./test-lib.sh

test_expect_success 'prepare repository' \
'echo "Hello" > init &&
git add init &&
git commit -m "Initial commit" &&
git branch B &&
echo "foo" > foo &&
git add foo &&
git commit -m "File: foo" &&
git checkout B &&
echo "bar" > foo '

test_expect_code 1 'Merge with local conflicts in new files' 'git
merge "merge msg" B master'

test_done

Thanks.

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

end of thread, other threads:[~2006-05-17  8:50 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-16 22:00 Merge with local conflicts in new files Santi
2006-05-16 22:12 ` Santi
2006-05-16 22:40 ` Junio C Hamano
2006-05-16 23:11   ` Santi
2006-05-16 23:28     ` Junio C Hamano
2006-05-17  7:47       ` Pavel Roskin
2006-05-17  8:20         ` Junio C Hamano
2006-05-17  8:50         ` Martin Langhoff
2006-05-17  8:17     ` [PATCH/RFC] read-tree -m -u: do not overwrite or remove untracked working tree files Junio C Hamano
2006-05-17  8:24       ` Jakub Narebski

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