Thread (2 messages) flat view 2 messages, 1 author, 2016-06-15

Merge with local conflicts in new files

From: Santi <hidden>
Date: 2016-06-15 22:42:26

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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help