summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/completion/git-completion.bash4
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 49a328aa8a..ba5c395d2d 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -2890,6 +2890,10 @@ _git_restore ()
--*)
__gitcomp_builtin restore
;;
+ *)
+ if __git rev-parse --verify --quiet HEAD >/dev/null; then
+ __git_complete_index_file "--modified"
+ fi
esac
}