Skip to content

Commit 75f4c7c

Browse files
pcloudsgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 4df3ec6 commit 75f4c7c

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

contrib/completion/git-completion.bash

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2491,6 +2491,21 @@ _git_reset ()
24912491
__git_complete_refs
24922492
}
24932493

2494+
_git_restore ()
2495+
{
2496+
case "$cur" in
2497+
--conflict=*)
2498+
__gitcomp "diff3 merge" "" "${cur##--conflict=}"
2499+
;;
2500+
--source=*)
2501+
__git_complete_refs --cur="${cur##--source=}"
2502+
;;
2503+
--*)
2504+
__gitcomp_builtin restore
2505+
;;
2506+
esac
2507+
}
2508+
24942509
__git_revert_inprogress_options="--continue --quit --abort"
24952510

24962511
_git_revert ()

0 commit comments

Comments
 (0)