completion.commands: fix multiple command removals
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest4 patches 3 repliesIn review
- v24 patches 1 replySuperseded
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | git: read local config in --list-cmdsgit.c help.c | +7 | 0 replies | |
| 2/4 | t9902: test multiple removals via completion.commandst/ | +6 | 0 replies | |
| 3/4 | completion: fix multiple command removalshelp.c t/ | +3 | 0 replies | |
| 4/4 | completion: use __git when calling --list-cmdscontrib/ | +4 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.
Cover letter [PATCH v3 0/4] completion.commands: fix multiple command removals
Hi,
Quoted 2 lines · Duy Nguyen
You probably want to drop the comment block about repository setup inside
list_cmds_by_config()too.
You're right, of course. Thanks Duy. :)
That's the only change since v2.
Other than a follow-up to update the commit reference in 4/4 after 1/4 is in the final form on pu, I think this might be good. If it's easier, we can skip 4/4 and I'll resend it after the others are on pu.
Jeff King (2):
git: read local config in --list-cmds
completion: fix multiple command removals
Todd Zullinger (2):
t9902: test multiple removals via completion.commands
completion: use __git when calling --list-cmds
contrib/completion/git-completion.bash | 8 ++++---- git.c | 7 +++++++ help.c | 11 ++--------- t/t9902-completion.sh | 6 ++++++ 4 files changed, 19 insertions(+), 13 deletions(-)
Range-diff against v2:
1: e51bdea6d3 ! 1: 6e9872b0e3 git: read local config in --list-cmds
@@ -33,3 +33,21 @@
while (*spec) {
const char *sep = strchrnul(spec, ',');
+
+ diff --git a/help.c b/help.c
+ --- a/help.c
+ +++ b/help.c
+@@
+ {
+ const char *cmd_list;
+
+- /*
+- * There's no actual repository setup at this point (and even
+- * if there is, we don't really care; only global config
+- * matters). If we accidentally set up a repository, it's ok
+- * too since the caller (git --list-cmds=) should exit shortly
+- * anyway.
+- */
+ if (git_config_get_string_const("completion.commands", &cmd_list))
+ return;
+
2: 2f5e9da9de = 2: 6873ae3868 t9902: test multiple removals via completion.commands 3: 7548dcc23f = 3: f66bbc0b55 completion: fix multiple command removals 4: 26bef0b2af = 4: 197b176483 completion: use __git when calling --list-cmds