# bash completion patch

5 messages from 2014-02-05 to 2014-02-10. Participants: 乙酸鋰, Matthieu Moy, Junio C Hamano, Thomas Rast.
Thread: https://gitlist.dev/t/35804

## 乙酸鋰, 2014-02-05 15:13

Subject: bash completion patch
Message-ID: <CAHtLG6Qgxq84Eo__vaXw5RAmyRuPnK-pt6n36+cjT8nVnRQN=w@mail.gmail.com>
URL: https://gitlist.dev/e/CAHtLG6Qgxq84Eo__vaXw5RAmyRuPnK-pt6n36%2BcjT8nVnRQN%3Dw%40mail.gmail.com

```
add --recurse-submodules


From 0390a24e2653e0cdb6bfb9a569c28e4d58002038 Mon Sep 17 00:00:00 2001
From: Sup Yut Sum <ch3cooli@gmail.com>
Date: Wed, 5 Feb 2014 23:09:46 +0800
Subject: [PATCH 1/1] bash completion: Add --recurse-submodules

---
 contrib/completion/git-completion.bash | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 9525343..87de809 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1221,14 +1221,20 @@ _git_difftool ()
 	__git_complete_revlist_file
 }
 
+__git_fetch_recurse_submodules="yes on-demand no"
+
 __git_fetch_options="
 	--quiet --verbose --append --upload-pack --force --keep --depth=
-	--tags --no-tags --all --prune --dry-run
+	--tags --no-tags --all --prune --dry-run --recurse-submodules=
 "
 
 _git_fetch ()
 {
 	case "$cur" in
+	--recurse-submodules=*)
+		__gitcomp "$__git_fetch_recurse_submodules" "" "${cur##--recurse-submodules=}"
+		return
+		;;
 	--*)
 		__gitcomp "$__git_fetch_options"
 		return
@@ -1583,6 +1589,10 @@ _git_pull ()
 	__git_complete_strategy && return
 
 	case "$cur" in
+	--recurse-submodules=*)
+		__gitcomp "$__git_fetch_recurse_submodules" "" "${cur##--recurse-submodules=}"
+		return
+		;;
 	--*)
 		__gitcomp "
 			--rebase --no-rebase
@@ -1595,6 +1605,8 @@ _git_pull ()
 	__git_complete_remote_or_refspec
 }
 
+__git_push_recurse_submodules="check on-demand"
+
 _git_push ()
 {
 	case "$prev" in
@@ -1607,10 +1619,15 @@ _git_push ()
 		__gitcomp_nl "$(__git_remotes)" "" "${cur##--repo=}"
 		return
 		;;
+	--recurse-submodules=*)
+		__gitcomp "$__git_push_recurse_submodules" "" "${cur##--recurse-submodules=}"
+		return
+		;;
 	--*)
 		__gitcomp "
 			--all --mirror --tags --dry-run --force --verbose
 			--receive-pack= --repo= --set-upstream
+			--recurse-submodules=
 		"
 		return
 		;;
-- 
1.8.5.2


```

## Matthieu Moy, 2014-02-05 16:08

Subject: Re: bash completion patch
Message-ID: <vpqk3d9o83t.fsf@anie.imag.fr>
URL: https://gitlist.dev/e/vpqk3d9o83t.fsf%40anie.imag.fr
In-Reply-To: <CAHtLG6Qgxq84Eo__vaXw5RAmyRuPnK-pt6n36+cjT8nVnRQN=w@mail.gmail.com>

```
乙酸鋰 <ch3cooli@gmail.com> writes:

> add --recurse-submodules

Thanks for the patch, but it cannot be included as-is.

Please, read Documentation/SubmittingPatches in Git's source tree. In
particular, the signed-off-by part. Also, don't use attachments to send
you patches (git send-email can help) and don't forget to Cc Junio if
you think your patch is ready for inclusion.

Thanks,

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

```

## Junio C Hamano, 2014-02-05 18:47

Subject: Re: bash completion patch
Message-ID: <xmqq4n4d5rcn.fsf@gitster.dls.corp.google.com>
URL: https://gitlist.dev/e/xmqq4n4d5rcn.fsf%40gitster.dls.corp.google.com
In-Reply-To: <vpqk3d9o83t.fsf@anie.imag.fr>

```
Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:

> 乙酸鋰 <ch3cooli@gmail.com> writes:
>
>> add --recurse-submodules
>
> Thanks for the patch, but it cannot be included as-is.
>
> Please, read Documentation/SubmittingPatches in Git's source tree. In
> particular, the signed-off-by part. Also, don't use attachments to send
> you patches (git send-email can help) and don't forget to Cc Junio if
> you think your patch is ready for inclusion.

Heh, thanks.  Everybody seems to think anything they send out to the
list is ready for inclusion, so the last part may not be a piece of
advice that is practically very useful, though ;-)

```

## Thomas Rast, 2014-02-09 08:58

Subject: Re: bash completion patch
Message-ID: <874n48ll1i.fsf@thomasrast.ch>
URL: https://gitlist.dev/e/874n48ll1i.fsf%40thomasrast.ch
In-Reply-To: <xmqq4n4d5rcn.fsf@gitster.dls.corp.google.com>

```
Junio C Hamano <gitster@pobox.com> writes:

> Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
>
[...]
>> don't forget to Cc Junio if
>> you think your patch is ready for inclusion.
>
> Heh, thanks.  Everybody seems to think anything they send out to the
> list is ready for inclusion, so the last part may not be a piece of
> advice that is practically very useful, though ;-)

That happens to me a lot, too.  Perhaps it would be a clearer signal if
you had an alias (or just something like gitster+patch) that we can send
it to if we mean "please include" instead of "what do you think of this"?

-- 
Thomas Rast
tr@thomasrast.ch

```

## Junio C Hamano, 2014-02-10 18:38

Subject: Re: bash completion patch
Message-ID: <xmqqsirqstia.fsf@gitster.dls.corp.google.com>
URL: https://gitlist.dev/e/xmqqsirqstia.fsf%40gitster.dls.corp.google.com
In-Reply-To: <874n48ll1i.fsf@thomasrast.ch>

```
Thomas Rast <tr@thomasrast.ch> writes:

> Junio C Hamano <gitster@pobox.com> writes:
>
>> Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
>>
> [...]
>>> don't forget to Cc Junio if
>>> you think your patch is ready for inclusion.
>>
>> Heh, thanks.  Everybody seems to think anything they send out to the
>> list is ready for inclusion, so the last part may not be a piece of
>> advice that is practically very useful, though ;-)
>
> That happens to me a lot, too.  Perhaps it would be a clearer signal if
> you had an alias (or just something like gitster+patch) that we can send
> it to if we mean "please include" instead of "what do you think of this"?

The intention from regulars like you I can read from the tone of the
message (or if you want to you can mention it in the log message).

If a clearer signal is really needed, perhaps we should say
something like:

    Send any patch that has not been reviewed on the list fist to
    the list and area experts (you can learn who they are by running
    "git blame" and "git shortlog" on the part of the system you are
    touching) for review.  Once the patch gains list consensus that
    it is a good change, and the maintainer hasn't picked it up
    (perhaps it fell through cracks), resend it to the maintainer
    with Cc: to the list.

We could phrase it more brutally:

    If it is the first time a particular patch is sent to the list, it
    almost always is not ready for inclusion.

but I do not think that is a good idea.

```
