* [PATCH] t9501: Do not use export X=Y
@ 2013-04-25 18:49 Torsten Bögershausen
2013-04-25 20:46 ` Junio C Hamano
0 siblings, 1 reply; 5+ messages in thread
From: Torsten Bögershausen @ 2013-04-25 18:49 UTC (permalink / raw)
To: git
Spilt lines like export X=Y into 2 lines:
X=Y
export X
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 &&
--
1.8.2.1.614.g66d7af5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] t9501: Do not use export X=Y
2013-04-25 18:49 [PATCH] t9501: Do not use export X=Y Torsten Bögershausen
@ 2013-04-25 20:46 ` Junio C Hamano
2013-04-26 9:21 ` Torsten Bögershausen
0 siblings, 1 reply; 5+ messages in thread
From: Junio C Hamano @ 2013-04-25 20:46 UTC (permalink / raw)
To: Torsten Bögershausen; +Cc: git
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.
> 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 &&
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] t9501: Do not use export X=Y
2013-04-25 20:46 ` Junio C Hamano
@ 2013-04-26 9:21 ` Torsten Bögershausen
2013-04-26 16:46 ` Junio C Hamano
0 siblings, 1 reply; 5+ messages in thread
From: Torsten Bögershausen @ 2013-04-26 9:21 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Torsten Bögershausen, git
On 2013-04-25 22.46, Junio C Hamano wrote:
> 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.
>
So true,
writing good commit messages is not easy.
and this was a good example for a bad example
Side questions:
Which shells of which OS/distribution do not understand export X=Y?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] t9501: Do not use export X=Y
2013-04-26 9:21 ` Torsten Bögershausen
@ 2013-04-26 16:46 ` Junio C Hamano
2013-04-26 18:14 ` Rodrigo Campos
0 siblings, 1 reply; 5+ messages in thread
From: Junio C Hamano @ 2013-04-26 16:46 UTC (permalink / raw)
To: Torsten Bögershausen; +Cc: git
Torsten Bögershausen <tboegi@web.de> writes:
> On 2013-04-25 22.46, Junio C Hamano wrote:
>> 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.
>>
> So true,
> writing good commit messages is not easy.
> and this was a good example for a bad example
>
> Side questions:
> Which shells of which OS/distribution do not understand export X=Y?
I have not met one for quite some time myself. cf.
http://thread.gmane.org/gmane.comp.version-control.git/35543/focus=35551
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] t9501: Do not use export X=Y
2013-04-26 16:46 ` Junio C Hamano
@ 2013-04-26 18:14 ` Rodrigo Campos
0 siblings, 0 replies; 5+ messages in thread
From: Rodrigo Campos @ 2013-04-26 18:14 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Torsten Bögershausen, git
On Fri, Apr 26, 2013 at 09:46:09AM -0700, Junio C Hamano wrote:
> Torsten Bögershausen <tboegi@web.de> writes:
>
> > On 2013-04-25 22.46, Junio C Hamano wrote:
> >> Torsten Bögershausen <tboegi@web.de> writes:
> >>
> >>> Spilt lines like export X=Y into 2 lines:
> >>> X=Y
> >>> export X
> >
> > Side questions:
> > Which shells of which OS/distribution do not understand export X=Y?
>
> I have not met one for quite some time myself. cf.
It seems Solaris /bin/sh doesn't like it. I don't have a Solaris to test it, but
this recent commit of gzip does this change because of Solaris:
http://article.gmane.org/gmane.comp.gnu.gzip.bugs/795
Thanks a lot,
Rodrigo
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-04-26 18:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-25 18:49 [PATCH] t9501: Do not use export X=Y Torsten Bögershausen
2013-04-25 20:46 ` Junio C Hamano
2013-04-26 9:21 ` Torsten Bögershausen
2013-04-26 16:46 ` Junio C Hamano
2013-04-26 18:14 ` Rodrigo Campos
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).