hooks: Add function to check if a hook exists
[gitweb.git] / contrib / completion / git-completion.bash
index 0b77eb1fa4074fb8ed5ef4cd4c37513f49804e7e..a4c48e179eb778077462a812b491e762e284486c 100644 (file)
@@ -971,6 +971,13 @@ _git_commit ()
 {
        __git_has_doubledash && return
 
+       case "$prev" in
+       -c|-C)
+               __gitcomp_nl "$(__git_refs)" "" "${cur}"
+               return
+               ;;
+       esac
+
        case "$cur" in
        --cleanup=*)
                __gitcomp "default strip verbatim whitespace