From: Nguyễn Thái Ngọc Duy Date: Thu, 25 Apr 2019 09:45:56 +0000 (+0700) Subject: completion: support restore X-Git-Tag: v2.23.0-rc0~64^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=75f4c7c1eb06cdf6eae1339bbac02dfb620acc11;p=thirdparty%2Fgit.git completion: support restore Completion for restore is straightforward. We could still do better though by giving the list of just tracked files instead of all present ones. But let's leave it for later. Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index b24bc48276..58d18d41a2 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -2491,6 +2491,21 @@ _git_reset () __git_complete_refs } +_git_restore () +{ + case "$cur" in + --conflict=*) + __gitcomp "diff3 merge" "" "${cur##--conflict=}" + ;; + --source=*) + __git_complete_refs --cur="${cur##--source=}" + ;; + --*) + __gitcomp_builtin restore + ;; + esac +} + __git_revert_inprogress_options="--continue --quit --abort" _git_revert ()