summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: aeb5932)
raw | patch | inline | side by side (parent: aeb5932)
author | Shawn O. Pearce <spearce@spearce.org> | |
Sun, 24 Jun 2007 23:42:16 +0000 (19:42 -0400) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Sun, 24 Jun 2007 23:42:16 +0000 (19:42 -0400) |
Using `git push origin +foo` to forcefully overwrite the remote
branch named foo is a common idiom, especially since + is shorter
than the long option --force and can be specified on a per-branch
basis.
We now complete `git push origin +foo` just like we do the standard
`git push origin foo`. The leading + on a branch refspec does not
alter the completion.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
branch named foo is a common idiom, especially since + is shorter
than the long option --force and can be specified on a per-branch
basis.
We now complete `git push origin +foo` just like we do the standard
`git push origin foo`. The leading + on a branch refspec does not
alter the completion.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
contrib/completion/git-completion.bash | patch | blob | history |
index c7c9963347f036323ee5680a3b2918f20cd77eb1..f2b10fa5f67942dc1c8d9d4f16048a6e7e976084 100755 (executable)
esac
__gitcomp "$(__git_refs "$remote")" "" "${cur#*:}"
;;
+ +*)
+ __gitcomp "$(__git_refs)" + "${cur#+}"
+ ;;
*)
__gitcomp "$(__git_refs)"
;;