summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: abfd5fa)
raw | patch | inline | side by side (parent: abfd5fa)
author | Thomas Rast <trast@student.ethz.ch> | |
Mon, 16 Feb 2009 16:34:57 +0000 (17:34 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 30 Mar 2009 16:06:48 +0000 (09:06 -0700) |
The gitk completion only shows --merge if MERGE_HEAD is present.
Do it the same way for git-log completion.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Do it the same way for git-log completion.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/completion/git-completion.bash | patch | blob | history |
index 554a03ff4fbc61e8b02b6010c9ffb9fad632f195..0bb74c05e52b53fd5afc1645146cfbe8cada4cd2 100755 (executable)
__git_has_doubledash && return
local cur="${COMP_WORDS[COMP_CWORD]}"
+ local g="$(git rev-parse --git-dir 2>/dev/null)"
+ local merge=""
+ if [ -f $g/MERGE_HEAD ]; then
+ merge="--merge"
+ fi
case "$cur" in
--pretty=*)
__gitcomp "
--decorate --diff-filter=
--color-words --walk-reflogs
--parents --children --full-history
- --merge
+ $merge
"
return
;;