зеркало из https://github.com/microsoft/git.git
Merge branch 'tr/merge-unborn-clobber'
* tr/merge-unborn-clobber: Exhibit merge bug that clobbers index&WT Conflicts: t/t7607-merge-overwrite.sh
This commit is contained in:
Коммит
1a9fe45326
|
@ -156,4 +156,20 @@ test_expect_success 'will not overwrite untracked file on unborn branch' '
|
|||
test_cmp important c0.c
|
||||
'
|
||||
|
||||
test_expect_success 'set up unborn branch and content' '
|
||||
git symbolic-ref HEAD refs/heads/unborn &&
|
||||
rm -f .git/index &&
|
||||
echo foo > tracked-file &&
|
||||
git add tracked-file &&
|
||||
echo bar > untracked-file
|
||||
'
|
||||
|
||||
test_expect_failure 'will not clobber WT/index when merging into unborn' '
|
||||
git merge master &&
|
||||
grep foo tracked-file &&
|
||||
git show :tracked-file >expect &&
|
||||
grep foo expect &&
|
||||
grep bar untracked-file
|
||||
'
|
||||
|
||||
test_done
|
||||
|
|
Загрузка…
Ссылка в новой задаче