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

Re: [PATCH v2] Ignore dirty submodule states during stash

From
Junio C Hamano <gitster@pobox.com>
Date
May 17, 2016, 16:15 UTC
Message-ID
<xmqqmvnoy82r.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20160517131635.GA5299@gmail.com>
Vasily Titskiy <qehgt0@gmail.com> writes:
Show 10 quoted lines
> diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh
> index 2142c1f..1be62f3 100755
> --- a/t/t3903-stash.sh
> +++ b/t/t3903-stash.sh
> @@ -731,4 +731,38 @@ test_expect_success 'stash list --cc shows combined diff' '
>  	test_cmp expect actual
>  '
>  
> +test_expect_success 'stash ignores changes in submodules' '
> +	git submodule init &&

Hmmmm... what is this "submodule init" needed for at this point in the test sequence?

Show 33 quoted lines
> +	git init sub1 &&
> +	(
> +		cd sub1 &&
> +		echo "x" >file1 &&
> +		git add file1 &&
> +		git commit -a -m "initial sub1"
> +	) &&
> +	git submodule add ./. sub1 &&
> +	echo "main" >file1 &&
> +	git add file1 &&
> +	git commit -a -m "initial main" &&
> +	# make changes in submodule
> +	(
> +		cd sub1 &&
> +		echo "y" >>file1 &&
> +		git commit -a -m "change y"
> +	) &&
> +	git commit sub1 -m "update reference" &&
> +	# switch submodule to another revision
> +	(
> +		cd sub1 &&
> +		echo "z" >>file1 &&
> +		git commit -a -m "change z"
> +	) &&
> +	# everything is prepared, check if changes in submodules are ignored
> +	echo "local change" >>file1 &&
> +	git stash save &&
> +	git checkout HEAD~1 &&
> +	git submodule update &&
> +	git stash pop
> +'
> +
>  test_done
Previous: Vasily TitskiyNext: Vasily Titskiy
Message 2 of 6 in “Ignore dirty submodule states during stash”
  1. Ignore dirty submodule states during stashVasily Titskiy, May 17, 2016
  2. Junio C HamanoMay 17, 2016
  3. Vasily TitskiyMay 17, 2016
  4. Junio C HamanoMay 17, 2016
  5. Vasily TitskiyMay 17, 2016
  6. Eric SunshineMay 17, 2016

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.