Skip to content

Commit

Permalink
t6038 (merge.renormalize): try checkout -m and cherry-pick
Browse files Browse the repository at this point in the history
checkout -m and cherry-pick have not been wired up to respect
merge.renormalize, but a naïve user would not know that.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Jonathan Nieder authored and Junio C Hamano committed Aug 6, 2010
1 parent 18acb30 commit d347cee
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions t/t6038-merge-text-auto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,47 @@ test_expect_success 'Merge addition of text=auto' '
test_cmp expected file
'

test_expect_failure 'checkout -m after setting text=auto' '
cat <<-\EOF >expected &&
first line
same line
EOF
git rm -fr . &&
rm -f .gitattributes &&
git reset --hard initial &&
git checkout a -- . &&
git checkout -m b &&
test_cmp expected file
'

test_expect_failure 'checkout -m addition of text=auto' '
cat <<-\EOF >expected &&
first line
same line
EOF
git rm -fr . &&
rm -f .gitattributes file &&
git reset --hard initial &&
git checkout b -- . &&
git checkout -m a &&
test_cmp expected file
'

test_expect_failure 'cherry-pick patch from after text=auto was added' '
append_cr <<-\EOF >expected &&
first line
same line
EOF
git rm -fr . &&
git reset --hard b &&
test_must_fail git cherry-pick a >err 2>&1 &&
grep "[Nn]othing added" err &&
test_cmp expected file
'

test_expect_success 'Test delete/normalize conflict' '
git checkout -f side &&
git rm -fr . &&
Expand Down

0 comments on commit d347cee

Please sign in to comment.