Merge branch 'js/gitdir-at-unc-root'
[gitweb.git] / t / t3400-rebase.sh
index 42f147858d7c2e87d6920cdd77744e99bf77001b..23469cc78937eeec8aabc26c158680c2ca60dd7d 100755 (executable)
@@ -285,7 +285,7 @@ EOF
        test_cmp From_.msg out
 '
 
-test_expect_success 'rebase--am.sh and --show-current-patch' '
+test_expect_success 'rebase --am and --show-current-patch' '
        test_create_repo conflict-apply &&
        (
                cd conflict-apply &&
@@ -301,6 +301,42 @@ test_expect_success 'rebase--am.sh 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 &&
        (