dir.c: fix missing dir invalidation in untracked code
[gitweb.git] / t / t9902-completion.sh
index 5ed28135bea13a6c4082413044d8dcb205449c38..fc614dcbfa74c39e120ff2fc80cdec07ea16a338 100755 (executable)
@@ -1245,6 +1245,10 @@ test_expect_success 'double dash "git checkout"' '
        --conflict=
        --orphan Z
        --patch Z
+       --detach Z
+       --ignore-skip-worktree-bits Z
+       --recurse-submodules Z
+       --no-recurse-submodules Z
        EOF
 '
 
@@ -1457,4 +1461,38 @@ test_expect_failure 'complete with tilde expansion' '
        test_completion "git add ~/tmp/" "~/tmp/file"
 '
 
+test_expect_success 'setup other remote for remote reference completion' '
+       git remote add other otherrepo &&
+       git fetch other
+'
+
+for flag in -d --delete
+do
+       test_expect_success "__git_complete_remote_or_refspec - push $flag other" '
+               sed -e "s/Z$//" >expected <<-EOF &&
+               master-in-other Z
+               EOF
+               (
+                       words=(git push '$flag' other ma) &&
+                       cword=${#words[@]} cur=${words[cword-1]} &&
+                       __git_complete_remote_or_refspec &&
+                       print_comp
+               ) &&
+               test_cmp expected out
+       '
+
+       test_expect_failure "__git_complete_remote_or_refspec - push other $flag" '
+               sed -e "s/Z$//" >expected <<-EOF &&
+               master-in-other Z
+               EOF
+               (
+                       words=(git push other '$flag' ma) &&
+                       cword=${#words[@]} cur=${words[cword-1]} &&
+                       __git_complete_remote_or_refspec &&
+                       print_comp
+               ) &&
+               test_cmp expected out
+       '
+done
+
 test_done