Merge branch 'jk/pack-objects-optim'
[gitweb.git] / t / t5520-pull.sh
index 739c089d500f76cbf726f0083062420a51874fc1..37ebbcfbbf0fd7815f598cf54d9c2c2825341f41 100755 (executable)
@@ -211,7 +211,7 @@ test_expect_success 'fail if the index has unresolved entries' '
        test -n "$(git ls-files -u)" &&
        cp file expected &&
        test_must_fail git pull . second 2>err &&
-       test_i18ngrep "Pull is not possible because you have unmerged files" err &&
+       test_i18ngrep "Pulling is not possible because you have unmerged files." err &&
        test_cmp expected file &&
        git add file &&
        test -z "$(git ls-files -u)" &&
@@ -341,6 +341,22 @@ test_expect_success 'branch.to-rebase.rebase should override pull.rebase' '
        test new = "$(git show HEAD:file2)"
 '
 
+test_expect_success "pull --rebase warns on --verify-signatures" '
+       git reset --hard before-rebase &&
+       git pull --rebase --verify-signatures . copy 2>err &&
+       test "$(git rev-parse HEAD^)" = "$(git rev-parse copy)" &&
+       test new = "$(git show HEAD:file2)" &&
+       test_i18ngrep "ignoring --verify-signatures for rebase" err
+'
+
+test_expect_success "pull --rebase does not warn on --no-verify-signatures" '
+       git reset --hard before-rebase &&
+       git pull --rebase --no-verify-signatures . copy 2>err &&
+       test "$(git rev-parse HEAD^)" = "$(git rev-parse copy)" &&
+       test new = "$(git show HEAD:file2)" &&
+       test_i18ngrep ! "verify-signatures" err
+'
+
 # add a feature branch, keep-merge, that is merged into master, so the
 # test can try preserving the merge commit (or not) with various
 # --rebase flags/pull.rebase settings.