summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Nguyễn Thái Ngọc Duy <pclouds@gmail.com>2019-04-25 16:45:56 +0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-05-07 13:04:48 +0900
commit75f4c7c1eb06cdf6eae1339bbac02dfb620acc11 (patch)
treefbc8c3298f3c2df1030d781950777277c85a2b37
parentt: add tests for restore (diff)
downloadtgif-75f4c7c1eb06cdf6eae1339bbac02dfb620acc11.tar.xz
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 <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--contrib/completion/git-completion.bash15
1 files changed, 15 insertions, 0 deletions
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 ()