Merge in GIT 1.5.3.8
[gitweb.git] / contrib / completion / git-completion.bash
index 599b2fc5711bf6022fdb635b08baac16068de7dd..343364de04d223c2843c651919803b97de616ba2 100755 (executable)
@@ -291,7 +291,7 @@ __git_commands ()
        for i in $(git help -a|egrep '^ ')
        do
                case $i in
-               add--interactive) : plumbing;;
+               *--*)             : helper pattern;;
                applymbox)        : ask gittus;;
                applypatch)       : ask gittus;;
                archimport)       : import;;
@@ -308,7 +308,6 @@ __git_commands ()
                diff-tree)        : plumbing;;
                fast-import)      : import;;
                fsck-objects)     : plumbing;;
-               fetch--tool)      : plumbing;;
                fetch-pack)       : plumbing;;
                fmt-merge-msg)    : plumbing;;
                for-each-ref)     : plumbing;;
@@ -551,6 +550,20 @@ _git_describe ()
 
 _git_diff ()
 {
+       local cur="${COMP_WORDS[COMP_CWORD]}"
+       case "$cur" in
+       --*)
+               __gitcomp "--cached --stat --numstat --shortstat --summary
+                       --patch-with-stat --name-only --name-status --color
+                       --no-color --color-words --no-renames --check
+                       --full-index --binary --abbrev --diff-filter
+                       --find-copies-harder --pickaxe-all --pickaxe-regex
+                       --text --ignore-space-at-eol --ignore-space-change
+                       --ignore-all-space --exit-code --quiet --ext-diff
+                       --no-ext-diff"
+               return
+               ;;
+       esac
        __git_complete_file
 }