Merge branch 'sg/complete-symmetric-diff'

* sg/complete-symmetric-diff:
  bash: complete 'git diff ...branc<TAB>'
  bash: fix misindented esac statement in __git_complete_file()
This commit is contained in:
Junio C Hamano 2011-03-22 21:37:47 -07:00
commit 1c92e39446

View File

@ -664,11 +664,14 @@ __git_compute_merge_strategies ()
: ${__git_merge_strategies:=$(__git_list_merge_strategies)}
}
__git_complete_file ()
__git_complete_revlist_file ()
{
local pfx ls ref cur
_get_comp_words_by_ref -n =: cur
case "$cur" in
*..?*:*)
return
;;
?*:*)
ref="${cur%%:*}"
cur="${cur#*:}"
@ -682,7 +685,7 @@ __git_complete_file ()
*)
ls="$ref"
;;
esac
esac
case "$COMP_WORDBREAKS" in
*:*) : great ;;
@ -707,17 +710,6 @@ __git_complete_file ()
s/^.* //')" \
-- "$cur"))
;;
*)
__gitcomp "$(__git_refs)"
;;
esac
}
__git_complete_revlist ()
{
local pfx cur
_get_comp_words_by_ref -n =: cur
case "$cur" in
*...*)
pfx="${cur%...*}..."
cur="${cur#*...}"
@ -734,6 +726,17 @@ __git_complete_revlist ()
esac
}
__git_complete_file ()
{
__git_complete_revlist_file
}
__git_complete_revlist ()
{
__git_complete_revlist_file
}
__git_complete_remote_or_refspec ()
{
local cur words cword
@ -1356,7 +1359,7 @@ _git_diff ()
return
;;
esac
__git_complete_file
__git_complete_revlist_file
}
__git_mergetools_common="diffuse ecmerge emerge kdiff3 meld opendiff