aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-03-30 13:23:53 -0700
committerJunio C Hamano <gitster@pobox.com>2009-03-30 13:23:53 -0700
commitdcbf0417453297207c7e61efbf1f38621b1caa3f (patch)
treef988ff10dc493f562ead94f1110ff1162db0c268 /contrib
parent8e4f767ba77051aedaac7ef6639ee990778866c7 (diff)
parentba7906f2f4c332f814d270d2e16b0010516fc53e (diff)
downloadgit-dcbf0417453297207c7e61efbf1f38621b1caa3f.tar.gz
git-dcbf0417453297207c7e61efbf1f38621b1caa3f.tar.xz
Merge branch 'maint-1.6.0' into maint-1.6.1
* maint-1.6.0: Fix bash completion in path with spaces bash completion: only show 'log --merge' if merging git-tag(1): add hint about commit messages Documentation: update graph api example.
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/completion/git-completion.bash9
1 files changed, 7 insertions, 2 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index e00454983..3889cfb5a 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -935,6 +935,11 @@ _git_log ()
__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 "
@@ -966,7 +971,7 @@ _git_log ()
--decorate --diff-filter=
--color-words --walk-reflogs
--parents --children --full-history
- --merge
+ $merge
"
return
;;
@@ -1751,7 +1756,7 @@ _gitk ()
local cur="${COMP_WORDS[COMP_CWORD]}"
local g="$(git rev-parse --git-dir 2>/dev/null)"
local merge=""
- if [ -f $g/MERGE_HEAD ]; then
+ if [ -f "$g/MERGE_HEAD" ]; then
merge="--merge"
fi
case "$cur" in