Skip to contentSkip to conversation

Add --recursive flag to git bash completion script.

PATCH In review James 2 participants 2 messages Jun 15, 2016

lore
Share & tools
lore

James

author
#0 lore raw

PATCH 1/1 Add --recursive flag to git bash completion script.

This is a patch to add a much needed option to the bash completion script. I'm not subscribed to this list, so please include me in your reply if you'd like me to see your response.

Thanks,
James

From ca976de5bfeccc9bd69c22183f82b9d1e59d2547 Mon Sep 17 00:00:00 2001
From: James Shubin <[email protected]>
Date: Sun, 8 Mar 2015 19:57:17 -0400
Subject: [PATCH] Add --recursive flag to git bash completion script.

This flag was missing from the list, and I use it quite often :)

---
 contrib/completion/git-completion.bash | 1 +
 1 file changed, 1 insertion(+)
contrib/completion/git-completion.bash +1 -0
index c21190d..6cb7ff5 100644
@@ -1090,6 +1090,7 @@ _git_clone ()
 			--no-hardlinks
 			--shared
 			--reference
+			--recursive
 			--quiet
 			--no-checkout
 			--bare
Signature · 1 line
2.1.0
#1 lore raw
Quoted 3 lines · James

This is a patch to add a much needed option to the bash completion script. I'm not subscribed to this list, so please include me in your reply if you'd like me to see your response.

Please read the guide on how to submit patches [1].

Although the change is trivial, some immediate problems I see are:

* The patch is attached rather than being inlined.
* The fix should also be made for the other shells (zsh and tcsh)
* The commit message contains an unnecessary smiley, personal digression, and a period in the first line.
* The change or the problem it is solving is not clearly described. I think it would be better if you write something like this in the first line:

"completion: add --recursive flag to git clone"

And for good measure, add another sentence below explaining why this should be available for completion.

Do a git log --grep completion to see how others have formulated changes in the same place in the past. You want to be consistent with them.

[1] https://raw.githubusercontent.com/git/git/master/Documentation/SubmittingPatches