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

Re: [PATCHv2 2/2] submodule: only preserve flags across recursive status/update invocations

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Nov 3, 2010, 05:38 UTC
Message-ID
<20101103053827.GD10631@burratino>
In-Reply-To
<1288760740-10075-2-git-send-email-kevin@sb.org>
Kevin Ballard wrote:
> --- a/git-submodule.sh
> +++ b/git-submodule.sh
> @@ -374,41 +374,35 @@ cmd_init()
[...]
Show 6 quoted lines
>  		--reference)
>  			case "$2" in '') usage ;; esac
>  			reference="--reference=$2"
> -			shift 2
> +			orig_flags="$orig_flags $(git rev-parse --sq-quote "$1")"
> +			shift
Hmm.  Maybe a helper would make it clearer.
	save_arg () {
		orig_flags="$orig_flags $(git rev-parse --sq-quote "$1")"
	}
making this
 +			save_arg --reference
 +			shift
Show 7 quoted lines
> --- a/t/t7407-submodule-foreach.sh
> +++ b/t/t7407-submodule-foreach.sh
> @@ -238,4 +238,23 @@ test_expect_success 'use "git clone --recursive" to checkout all submodules' '
>  	test -d clone4/nested1/nested2/nested3/submodule/.git
>  '
>  
> +test_expect_success 'use "update --recursive nested1" to checkout all submodules rooted in nested1' '
Maybe a submodule status --cached --recursive -- <files> test, too?

Sleepily, Jonathan

Previous: Kevin BallardNext: Kevin Ballard
Message 9 of 17 in “submodule: preserve all arguments exactly when recursing”
  1. 1/2 submodule: preserve all arguments exactly when recursingKevin Ballard, Nov 3, 2010
  2. 2/2 submodule: only preserve flags across recursive status/update invocationsKevin Ballard, Nov 3, 2010
  3. Jonathan NiederNov 3, 2010
  4. Kevin BallardNov 3, 2010
  5. 1/2 submodule: preserve all arguments exactly when recursingKevin Ballard, Nov 3, 2010
  6. Jonathan NiederNov 3, 2010
  7. Kevin BallardNov 3, 2010
  8. 2/2 submodule: only preserve flags across recursive status/update invocationsKevin Ballard, Nov 3, 2010
  9. Jonathan NiederNov 3, 2010
  10. Kevin BallardNov 3, 2010
  11. 1/2 submodule: preserve all arguments exactly when recursingKevin Ballard, Nov 3, 2010
  12. 2/2 submodule: only preserve flags across recursive status/update invocationsKevin Ballard, Nov 3, 2010
  13. Junio C HamanoNov 5, 2010
  14. Jonathan NiederNov 3, 2010
  15. Kevin BallardNov 3, 2010
  16. Jonathan NiederNov 3, 2010
  17. Kevin BallardNov 3, 2010

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.