@matheusbsbs / matheus-bagliano / commits / e648f8b6d0
Fork 0

bash: teach 'git checkout' options

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

SZEDER Gábor committed Sep 24, 2009 at 14:23 UTC e648f8b6d0dc6fb7e8c8e3ed47eec6b12aaf450a
1 file changed +15 -1
contrib/completion/git-completion.bash
+15 -1
@@ -810,7 +810,21 @@ _git_checkout ()
810 {
811 __git_has_doubledash && return
812
813 - __gitcomp "$(__git_refs)"
813 + local cur="${COMP_WORDS[COMP_CWORD]}"
814 + case "$cur" in
815 + --conflict=*)
816 + __gitcomp "diff3 merge" "" "${cur##--conflict=}"
817 + ;;
818 + --*)
819 + __gitcomp "
820 + --quiet --ours --theirs --track --no-track --merge
821 + --conflict= --patch
822 + "
823 + ;;
824 + *)
825 + __gitcomp "$(__git_refs)"
826 + ;;
827 + esac
828 }
829
830 _git_cherry ()