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

Re: [PATCH] t9501: Do not use export X=Y

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 25, 2013, 20:46 UTC
Message-ID
<7va9om2v9z.fsf@alter.siamese.dyndns.org>
In-Reply-To
<201304252049.00811.tboegi@web.de>
Torsten Bögershausen <tboegi@web.de> writes:
> Spilt lines like export X=Y into 2 lines:
> X=Y
> export X
That can be read from the patch text.

If you are going to spend three lines, please describe why it has to be split; that would help educate developers new to the codebase.

Thanks.
Show 59 quoted lines
> Signed-off-by: Torsten Bögershausen <tboegi@web.de>
> ---
>  t/t9501-gitweb-standalone-http-status.sh | 15 ++++++++++-----
>  1 file changed, 10 insertions(+), 5 deletions(-)
>
> diff --git a/t/t9501-gitweb-standalone-http-status.sh b/t/t9501-gitweb-standalone-http-status.sh
> index ef86948..d3a5bac 100755
> --- a/t/t9501-gitweb-standalone-http-status.sh
> +++ b/t/t9501-gitweb-standalone-http-status.sh
> @@ -130,7 +130,8 @@ test_expect_success DATE_PARSER 'modification: feed last-modified' '
>  test_debug 'cat gitweb.headers'
>  
>  test_expect_success DATE_PARSER 'modification: feed if-modified-since (modified)' '
> -	export HTTP_IF_MODIFIED_SINCE="Wed, 6 Apr 2005 22:14:13 +0000" &&
> +	HTTP_IF_MODIFIED_SINCE="Wed, 6 Apr 2005 22:14:13 +0000" &&
> +	export HTTP_IF_MODIFIED_SINCE &&
>  	test_when_finished "unset HTTP_IF_MODIFIED_SINCE" &&
>  	gitweb_run "p=.git;a=atom;h=master" &&
>  	grep "Status: 200 OK" gitweb.headers
> @@ -138,7 +139,8 @@ test_expect_success DATE_PARSER 'modification: feed if-modified-since (modified)
>  test_debug 'cat gitweb.headers'
>  
>  test_expect_success DATE_PARSER 'modification: feed if-modified-since (unmodified)' '
> -	export HTTP_IF_MODIFIED_SINCE="Thu, 7 Apr 2005 22:14:13 +0000" &&
> +	HTTP_IF_MODIFIED_SINCE="Thu, 7 Apr 2005 22:14:13 +0000" &&
> +	export HTTP_IF_MODIFIED_SINCE &&
>  	test_when_finished "unset HTTP_IF_MODIFIED_SINCE" &&
>  	gitweb_run "p=.git;a=atom;h=master" &&
>  	grep "Status: 304 Not Modified" gitweb.headers
> @@ -153,7 +155,8 @@ test_expect_success DATE_PARSER 'modification: snapshot last-modified' '
>  test_debug 'cat gitweb.headers'
>  
>  test_expect_success DATE_PARSER 'modification: snapshot if-modified-since (modified)' '
> -	export HTTP_IF_MODIFIED_SINCE="Wed, 6 Apr 2005 22:14:13 +0000" &&
> +	HTTP_IF_MODIFIED_SINCE="Wed, 6 Apr 2005 22:14:13 +0000" &&
> +	export HTTP_IF_MODIFIED_SINCE &&
>  	test_when_finished "unset HTTP_IF_MODIFIED_SINCE" &&
>  	gitweb_run "p=.git;a=snapshot;h=master;sf=tgz" &&
>  	grep "Status: 200 OK" gitweb.headers
> @@ -161,7 +164,8 @@ test_expect_success DATE_PARSER 'modification: snapshot if-modified-since (modif
>  test_debug 'cat gitweb.headers'
>  
>  test_expect_success DATE_PARSER 'modification: snapshot if-modified-since (unmodified)' '
> -	export HTTP_IF_MODIFIED_SINCE="Thu, 7 Apr 2005 22:14:13 +0000" &&
> +	HTTP_IF_MODIFIED_SINCE="Thu, 7 Apr 2005 22:14:13 +0000" &&
> +	export HTTP_IF_MODIFIED_SINCE &&
>  	test_when_finished "unset HTTP_IF_MODIFIED_SINCE" &&
>  	gitweb_run "p=.git;a=snapshot;h=master;sf=tgz" &&
>  	grep "Status: 304 Not Modified" gitweb.headers
> @@ -170,7 +174,8 @@ test_debug 'cat gitweb.headers'
>  
>  test_expect_success DATE_PARSER 'modification: tree snapshot' '
>  	ID=`git rev-parse --verify HEAD^{tree}` &&
> -	export HTTP_IF_MODIFIED_SINCE="Wed, 6 Apr 2005 22:14:13 +0000" &&
> +	HTTP_IF_MODIFIED_SINCE="Wed, 6 Apr 2005 22:14:13 +0000" &&
> +	export HTTP_IF_MODIFIED_SINCE &&
>  	test_when_finished "unset HTTP_IF_MODIFIED_SINCE" &&
>  	gitweb_run "p=.git;a=snapshot;h=$ID;sf=tgz" &&
>  	grep "Status: 200 OK" gitweb.headers &&
Previous: Torsten BögershausenNext: Torsten Bögershausen
Message 2 of 5 in “t9501: Do not use export X=Y”
  1. t9501: Do not use export X=YTorsten Bögershausen, Apr 25, 2013
  2. Junio C HamanoApr 25, 2013
  3. Torsten BögershausenApr 26, 2013
  4. Junio C HamanoApr 26, 2013
  5. Rodrigo CamposApr 26, 2013

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.