git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v5 3/3] push: teach --recurse-submodules the on-demand option

From
Heiko Voigt <hvoigt@hvoigt.net>
Date
Mar 28, 2012, 15:30 UTC
Message-ID
<20120328153010.GA46920@book.hvoigt.net>
In-Reply-To
<4F70DE29.6050808@in.waw.pl>
On Mon, Mar 26, 2012 at 11:22:49PM +0200, Zbigniew J??drzejewski-Szmek wrote:
Show 33 quoted lines
> On 02/13/2012 10:30 AM, Heiko Voigt wrote:
>> When using this option git will search for all submodules that
>> have changed in the revisions to be send. It will then try to
>> push the currently checked out branch of each submodule.
>>
>> This helps when a user has finished working on a change which
>> involves submodules and just wants to push everything in one go.
>
>> ---recurse-submodules=check::
>> -	Check whether all submodule commits used by the revisions to be
>> -	pushed are available on a remote tracking branch. Otherwise the
>> -	push will be aborted and the command will exit with non-zero status.
>> +--recurse-submodules=<check|on-demand>::
>> +	Make sure all submodule commits used by the revisions to be
>> +	pushed are available on a remote tracking branch. If check is
>> +	used it will be checked that all submodule commits that changed
>> +	in the revisions to be pushed are available on a remote.
>> +	Otherwise the push will be aborted and exit with non-zero
>> +	status. If on-demand is used all submodules that changed in the
>> +	revisions to be pushed will be pushed. If on-demand was not able
>> +	to push all necessary revisions it will also be aborted and exit
>> +	with non-zero status.
> Hi,
> this desciption seems awkward. Not sure how to improve it, but:
> - the argument 'check' is changed to '<check|on-demand>', i.e. brackets  
> are added. This changes the meaning, because brackets are used around a  
> name for a value provided by the user. So here brackets shouldn't be  
> used, because 'check' and 'on-demand' are literals.
> - s/if check is used it will be checked/if check is used git will verify  
> that/
> - s/a remote/the remote/
> - s/Otherwise the push/If any commits are missing the push/ (because  
> 'Otherwise' could refer to 'If check is used'.)
I agree on all of these except
	s/a remote/the remote/
which I changed to
	s/a remote/at least one remote of the submodule/

since it really just checks whether the commits are on some remote. It it not strictly the one defined in .gitmodules. Doing it this way allows to work with forks without the need to change .gitmodules.

Cheers Heiko
Previous: Zbigniew Jędrzejewski-Szmek
Message 17 of 17 in “push: submodule support”
  1. 0/3 push: submodule supportHeiko Voigt, Feb 13, 2012
  2. 1/3 Teach revision walking machinery to walk multiple times sequenciallyHeiko Voigt, Feb 13, 2012
  3. Junio C HamanoFeb 14, 2012
  4. Heiko VoigtMar 26, 2012
  5. Junio C HamanoMar 26, 2012
  6. 2/3 Refactor submodule push check to use string list instead of integerHeiko Voigt, Feb 13, 2012
  7. Junio C HamanoFeb 14, 2012
  8. Heiko VoigtMar 26, 2012
  9. Heiko VoigtMar 26, 2012
  10. Junio C HamanoMar 26, 2012
  11. 3/3 push: teach --recurse-submodules the on-demand optionHeiko Voigt, Feb 13, 2012
  12. Junio C HamanoFeb 14, 2012
  13. Jens LehmannFeb 15, 2012
  14. Heiko VoigtMar 26, 2012
  15. read from 2 filedescriptors simultaneously into one strbufHeiko Voigt, May 13, 2012
  16. Zbigniew Jędrzejewski-SzmekMar 26, 2012
  17. Heiko VoigtMar 28, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.