[PATCH v2 2/2] if a file has been staged we don't want to list it

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: David Cantrell <david@xxxxxxxxxxxxxxx>

The previous use of --committable would include files that
had been `git add`ed, but for which a simple `git restore filename`
doesn't work. --modifed only lists those whose modifications have
not been staged.

Signed-off-by: David Cantrell <david@xxxxxxxxxxxxxxx>
---
 contrib/completion/git-completion.bash | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 7ccad8ff4b1..10773a9fecd 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -2896,7 +2896,7 @@ _git_restore ()
 	esac
 
 	if __git rev-parse --verify --quiet HEAD >/dev/null; then
-		__git_complete_index_file "--committable"
+		__git_complete_index_file "--modified"
 	fi
 }
 
-- 
gitgitgadget



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux