Code

bash: add support for 'git replace'
authorBjörn Gustavsson <bgustavsson@gmail.com>
Fri, 9 Oct 2009 20:49:06 +0000 (22:49 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 9 Oct 2009 22:36:41 +0000 (15:36 -0700)
Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/completion/git-completion.bash

index e482c8d0765650b7c5d5f565da5d9c13d251d82d..7cf855746832b7400f9923297c4a0170cfacce36 100755 (executable)
@@ -1798,6 +1798,11 @@ _git_remote ()
        esac
 }
 
+_git_replace ()
+{
+       __gitcomp "$(__git_refs)"
+}
+
 _git_reset ()
 {
        __git_has_doubledash && return
@@ -2166,6 +2171,7 @@ _git ()
        push)        _git_push ;;
        rebase)      _git_rebase ;;
        remote)      _git_remote ;;
+       replace)     _git_replace ;;
        reset)       _git_reset ;;
        revert)      _git_revert ;;
        rm)          _git_rm ;;