All of lore.kernel.org
 help / color / mirror / Atom feed
From: "David Cantrell via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: David Cantrell <david@cantrell.org.uk>,
	David Cantrell <david@cantrell.org.uk>
Subject: [PATCH v2 2/2] if a file has been staged we don't want to list it
Date: Tue, 15 Mar 2022 00:52:27 +0000	[thread overview]
Message-ID: <16aa4d0b2e4fdf4d807723a9aeb64ca7efb43233.1647305547.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.1227.v2.git.git.1647305547.gitgitgadget@gmail.com>

From: David Cantrell <david@cantrell.org.uk>

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@cantrell.org.uk>
---
 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

  parent reply	other threads:[~2022-03-15  0:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-11 21:07 [PATCH] tab completion of filenames for 'git restore' David Cantrell via GitGitGadget
2022-03-13  6:45 ` Junio C Hamano
2022-03-14 23:45   ` David Cantrell
2022-03-15 10:23     ` Junio C Hamano
2022-03-15  0:52 ` [PATCH v2 0/2] Improved bash tab completion for 'git restore' - adds support for auto-completing filenames David Cantrell via GitGitGadget
2022-03-15  0:52   ` [PATCH v2 1/2] tab completion of filenames for 'git restore' David Cantrell via GitGitGadget
2022-03-15  0:52   ` David Cantrell via GitGitGadget [this message]
2022-03-16 11:45     ` [PATCH v2 2/2] if a file has been staged we don't want to list it Bagas Sanjaya
2022-03-15 11:23   ` [PATCH v2 0/2] Improved bash tab completion for 'git restore' - adds support for auto-completing filenames Junio C Hamano
2022-03-15 16:27     ` Junio C Hamano
2022-03-15 22:13   ` [PATCH v3] tab completion of filenames for 'git restore' David Cantrell via GitGitGadget
2022-03-16  0:44     ` Junio C Hamano
2022-03-17 22:16       ` David Cantrell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=16aa4d0b2e4fdf4d807723a9aeb64ca7efb43233.1647305547.git.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=david@cantrell.org.uk \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.