Skip to contentSkip to conversation

completion: add option '--recurse-submodules' to 'git clone'

PATCH In review Chris Packham 3 participants 6 messages Jul 27, 2016 – Jul 29, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 completion: add option '--recurse-submodules' to 'git clone'

---
Hi,

I noticed --recurse-submodules was missing from the bash completion. This adds it. I went for '--recurse-submodules' instead of '--recursive' as I seem to recall the former being agreed upon as the better (or least ambiguous) of the two terms.

 contrib/completion/git-completion.bash | 1 +
 1 file changed, 1 insertion(+)
contrib/completion/git-completion.bash +1 -0
index 37888f4..7c06455 100644
@@ -1136,6 +1136,7 @@ _git_clone ()
 			--depth
 			--single-branch
 			--branch
+			--recurse-submodules
 			"
 		return
 		;;
Signature · 1 line
2.9.2
#1 lore raw
Quoted 8 lines · Chris Packham

---
Hi,

I noticed --recurse-submodules was missing from the bash completion. This adds it. I went for '--recurse-submodules' instead of '--recursive' as I seem to recall the former being agreed upon as the better (or least ambiguous) of the two terms.

Yup, that position is consistent with what 3446a54c (clone: fixup recurse_submodules option, 2011-02-11) gave us.

Perhaps we should think about deprecating "--recursive"? I dunno.

Quoted 15 lines
 contrib/completion/git-completion.bash | 1 +
 1 file changed, 1 insertion(+)
contrib/completion/git-completion.bash +1 -0
index 37888f4..7c06455 100644
@@ -1136,6 +1136,7 @@ _git_clone ()
 			--depth
 			--single-branch
 			--branch
+			--recurse-submodules
 			"
 		return
 		;;
#2 lore raw
Quoted 7 lines · Junio C Hamano
Quoted 4 lines

I noticed --recurse-submodules was missing from the bash completion. This adds it. I went for '--recurse-submodules' instead of '--recursive' as I seem to recall the former being agreed upon as the better (or least ambiguous) of the two terms.

Yup, that position is consistent with what 3446a54c (clone: fixup recurse_submodules option, 2011-02-11) gave us.

Silly me. The blame actually goes down to ccdd3da6 (clone: Add the --recurse-submodules option as alias for --recursive, 2010-11-04), but the conclusion is the same.

Quoted 1 line

Perhaps we should think about deprecating "--recursive"? I dunno.

Anyway, I'll apply the "addition to the completion" patch.

Thanks.

#3 lore raw
Quoted 14 lines · Junio C Hamano
Quoted 7 lines · Junio C Hamano
Quoted 4 lines

I noticed --recurse-submodules was missing from the bash completion. This adds it. I went for '--recurse-submodules' instead of '--recursive' as I seem to recall the former being agreed upon as the better (or least ambiguous) of the two terms.

Yup, that position is consistent with what 3446a54c (clone: fixup recurse_submodules option, 2011-02-11) gave us.

Silly me. The blame actually goes down to ccdd3da6 (clone: Add the --recurse-submodules option as alias for --recursive, 2010-11-04), but the conclusion is the same.

Quoted 5 lines
Quoted 1 line

Perhaps we should think about deprecating "--recursive"? I dunno.

Anyway, I'll apply the "addition to the completion" patch.

Thanks.

Thanks for this patch!

Note: if we ever decide to resurrect sb/submodule-default-path, we run into a merge conflict. The reasoning for using "--recurse-submodules" instead of a plain "--recurse" makes sense as well, so that merge conflict will be resolved in favor of this patch.

Thanks,
Stefan

#4 lore raw
Quoted 10 lines · Stefan Beller
Quoted 3 lines

Anyway, I'll apply the "addition to the completion" patch.

Thanks.

Thanks for this patch!

Note: if we ever decide to resurrect sb/submodule-default-path, we run into a merge conflict. The reasoning for using "--recurse-submodules" instead of a plain "--recurse" makes sense as well, so that merge conflict will be resolved in favor of this patch.

Thanks for an advance warning. My rerere database has already been taught about this conflict ;-)

As to sb/submodule-default-path topic, which has been blocked on still-in-flux attribute work, I am tempted to declare that the attribute work is not yet thread-ready but it is in a good enough shape to base other works on, and have them advance to 'next'.

The traditional pattern of allowing the callers to randomly allocate an array of "struct git_attr_check" and passing the pointer to its first element to git_check_attr() function was impossible to extend without having to update the callers, but we have migrated away from the pattern and the attribute subsystem can be enhanced without impacting the callers too much.

#5 lore raw
Quoted 13 lines · Junio C Hamano
Quoted 10 lines · Stefan Beller
Quoted 3 lines

Anyway, I'll apply the "addition to the completion" patch.

Thanks.

Thanks for this patch!

Note: if we ever decide to resurrect sb/submodule-default-path, we run into a merge conflict. The reasoning for using "--recurse-submodules" instead of a plain "--recurse" makes sense as well, so that merge conflict will be resolved in favor of this patch.

Quoted 7 lines

Thanks for an advance warning. My rerere database has already been taught about this conflict ;-)

As to sb/submodule-default-path topic, which has been blocked on still-in-flux attribute work, I am tempted to declare that the attribute work is not yet thread-ready but it is in a good enough shape to base other works on, and have them advance to 'next'.

I am tempted to ask for delaying sb/submodule-default-path a bit more and see if there is an alternative solution.

Inspired by Duys series on submodules and worktree I found a new way how to do the submodule management (separation of the submodule URL as a flag indicating the existence and the actual URL), and that will be very similar to what is implemented in sb/submodule-default-path just even more streamlined. (That said the state of that new series is still vapor and not yet solid, so ... it's hopes and dreams.)

Quoted 8 lines

The traditional pattern of allowing the callers to randomly allocate an array of "struct git_attr_check" and passing the pointer to its first element to git_check_attr() function was impossible to extend without having to update the callers, but we have migrated away from the pattern and the attribute subsystem can be enhanced without impacting the callers too much.