diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-09-09 21:26:40 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-09-09 21:26:40 +0200 |
commit | c8ada15456f951913dbf628a7c441032e90b8e11 (patch) | |
tree | 60e0e012e23b909c6938b2f164b1c8f92bed518a /t/t3400-rebase.sh | |
parent | Merge branch 'tg/t0021-racefix' (diff) | |
parent | am: reload .gitattributes after patching it (diff) | |
download | git-c8ada15456f951913dbf628a7c441032e90b8e11.tar.xz git-c8ada15456f951913dbf628a7c441032e90b8e11.zip |
Merge branch 'bc/reread-attributes-during-rebase'
The "git am" based backend of "git rebase" ignored the result of
updating ".gitattributes" done in one step when replaying
subsequent steps.
* bc/reread-attributes-during-rebase:
am: reload .gitattributes after patching it
path: add a function to check for path suffix
Diffstat (limited to 't/t3400-rebase.sh')
-rwxr-xr-x | t/t3400-rebase.sh | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh index 80b23fd326..23469cc789 100755 --- a/t/t3400-rebase.sh +++ b/t/t3400-rebase.sh @@ -301,6 +301,42 @@ test_expect_success 'rebase --am and --show-current-patch' ' ) ' +test_expect_success 'rebase --am and .gitattributes' ' + test_create_repo attributes && + ( + cd attributes && + test_commit init && + git config filter.test.clean "sed -e '\''s/smudged/clean/g'\''" && + git config filter.test.smudge "sed -e '\''s/clean/smudged/g'\''" && + + test_commit second && + git checkout -b test HEAD^ && + + echo "*.txt filter=test" >.gitattributes && + git add .gitattributes && + test_commit third && + + echo "This text is smudged." >a.txt && + git add a.txt && + test_commit fourth && + + git checkout -b removal HEAD^ && + git rm .gitattributes && + git add -u && + test_commit fifth && + git cherry-pick test && + + git checkout test && + git rebase master && + grep "smudged" a.txt && + + git checkout removal && + git reset --hard && + git rebase master && + grep "clean" a.txt + ) +' + test_expect_success 'rebase--merge.sh and --show-current-patch' ' test_create_repo conflict-merge && ( |