echo "$__git_merge_strategylist"
return
fi
- sed -n "/^all_strategies='/{
- s/^all_strategies='//
- s/'//
+ git merge -s help 2>&1 |
+ sed -n -e '/[Aa]vailable strategies are: /,/^$/{
+ s/\.$//
+ s/.*://
+ s/^[ ]*//
+ s/[ ]*$//
p
- q
- }" "$(git --exec-path)/git-merge"
+ }'
}
__git_merge_strategylist=
-__git_merge_strategylist="$(__git_merge_strategies 2>/dev/null)"
+__git_merge_strategylist=$(__git_merge_strategies 2>/dev/null)
__git_complete_file ()
{
return 1
}
-__git_whitespacelist="nowarn warn error error-all strip"
+__git_whitespacelist="nowarn warn error error-all fix"
_git_am ()
{
return
;;
esac
- __gitcomp "$(__git_all_commands)"
+ __gitcomp "$(__git_all_commands)
+ attributes cli core-tutorial cvs-migration
+ diffcore gitk glossary hooks ignore modules
+ repository-layout tutorial tutorial-2
+ "
}
_git_init ()
--decorate --diff-filter=
--color-words --walk-reflogs
--parents --children --full-history
+ --merge
"
return
;;
__gitcomp "$(__git_refs)"
}
+_git_mergetool ()
+{
+ local cur="${COMP_WORDS[COMP_CWORD]}"
+ case "$cur" in
+ --tool=*)
+ __gitcomp "
+ kdiff3 tkdiff meld xxdiff emerge
+ vimdiff gvimdiff ecmerge opendiff
+ " "" "${cur##--tool=}"
+ return
+ ;;
+ --*)
+ __gitcomp "--tool="
+ return
+ ;;
+ esac
+ COMPREPLY=()
+}
+
_git_merge_base ()
{
__gitcomp "$(__git_refs)"
apply,--*)
__gitcomp "--index"
;;
- show,--*|apply,--*|drop,--*|pop,--*|branch,--*)
+ show,--*|drop,--*|pop,--*|branch,--*)
COMPREPLY=()
;;
show,*|apply,*|drop,*|pop,*|branch,*)
ls-remote) _git_ls_remote ;;
ls-tree) _git_ls_tree ;;
merge) _git_merge;;
+ mergetool) _git_mergetool;;
merge-base) _git_merge_base ;;
mv) _git_mv ;;
name-rev) _git_name_rev ;;