All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] t9821: use test_config
@ 2015-09-03  9:34 larsxschneider
  2015-09-03  9:34 ` larsxschneider
  0 siblings, 1 reply; 5+ messages in thread
From: larsxschneider @ 2015-09-03  9:34 UTC (permalink / raw)
  To: git; +Cc: remi.galan-alfonso, Lars Schneider

From: Lars Schneider <larsxschneider@gmail.com>

Thanks Remi for pointing out test_config to me!

Cheers,
Lars

Lars Schneider (1):
  t9821: use test_config

 t/t9821-git-p4-path-variations.sh | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

--
1.9.5 (Apple Git-50.3)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v1] t9821: use test_config
  2015-09-03  9:34 [PATCH v1] t9821: use test_config larsxschneider
@ 2015-09-03  9:34 ` larsxschneider
  2015-09-03 13:04   ` Eric Sunshine
  0 siblings, 1 reply; 5+ messages in thread
From: larsxschneider @ 2015-09-03  9:34 UTC (permalink / raw)
  To: git; +Cc: remi.galan-alfonso, Lars Schneider

From: Lars Schneider <larsxschneider@gmail.com>

Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
---
 t/t9821-git-p4-path-variations.sh | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/t/t9821-git-p4-path-variations.sh b/t/t9821-git-p4-path-variations.sh
index 81e46ac..5a26fec 100755
--- a/t/t9821-git-p4-path-variations.sh
+++ b/t/t9821-git-p4-path-variations.sh
@@ -45,7 +45,7 @@ test_expect_success 'Clone root' '
 	(
 		cd "$git" &&
 		git init . &&
-		git config core.ignorecase false &&
+		test_config core.ignorecase false &&
 		git p4 clone --use-client-spec --destination="$git" //depot &&
 		# This method is used instead of "test -f" to ensure the case is
 		# checked even if the test is executed on case-insensitive file systems.
@@ -67,7 +67,7 @@ test_expect_success 'Clone root (ignorecase)' '
 	(
 		cd "$git" &&
 		git init . &&
-		git config core.ignorecase true &&
+		test_config core.ignorecase true &&
 		git p4 clone --use-client-spec --destination="$git" //depot &&
 		# This method is used instead of "test -f" to ensure the case is
 		# checked even if the test is executed on case-insensitive file systems.
@@ -91,7 +91,7 @@ test_expect_success 'Clone root and ignore one file' '
 	(
 		cd "$git" &&
 		git init . &&
-		git config core.ignorecase false &&
+		test_config core.ignorecase false &&
 		git p4 clone --use-client-spec --destination="$git" //depot &&
 		# We ignore one file in the client spec and all path cases change from
 		# "TO" to "to"!
@@ -113,7 +113,7 @@ test_expect_success 'Clone root and ignore one file (ignorecase)' '
 	(
 		cd "$git" &&
 		git init . &&
-		git config core.ignorecase true &&
+		test_config core.ignorecase true &&
 		git p4 clone --use-client-spec --destination="$git" //depot &&
 		# We ignore one file in the client spec and all path cases change from
 		# "TO" to "to"!
@@ -133,7 +133,7 @@ test_expect_success 'Clone path' '
 	(
 		cd "$git" &&
 		git init . &&
-		git config core.ignorecase false &&
+		test_config core.ignorecase false &&
 		git p4 clone --use-client-spec --destination="$git" //depot &&
 		cat >expect <<-\EOF &&
 		to/File2.txt
@@ -149,7 +149,7 @@ test_expect_success 'Clone path (ignorecase)' '
 	(
 		cd "$git" &&
 		git init . &&
-		git config core.ignorecase true &&
+		test_config core.ignorecase true &&
 		git p4 clone --use-client-spec --destination="$git" //depot &&
 		cat >expect <<-\EOF &&
 		TO/File2.txt
@@ -180,7 +180,7 @@ test_expect_success 'Add a new file and clone path with new file (ignorecase)' '
 	(
 		cd "$git" &&
 		git init . &&
-		git config core.ignorecase true &&
+		test_config core.ignorecase true &&
 		git p4 clone --use-client-spec --destination="$git" //depot &&
 		cat >expect <<-\EOF &&
 		to/File0.txt
--
1.9.5 (Apple Git-50.3)

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v1] t9821: use test_config
  2015-09-03  9:34 ` larsxschneider
@ 2015-09-03 13:04   ` Eric Sunshine
  2015-09-03 15:13     ` Lars Schneider
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Sunshine @ 2015-09-03 13:04 UTC (permalink / raw)
  To: Lars Schneider; +Cc: Git List, Galan Rémi

On Thu, Sep 3, 2015 at 5:34 AM,  <larsxschneider@gmail.com> wrote:
> From: Lars Schneider <larsxschneider@gmail.com>
>
> Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
> ---
> diff --git a/t/t9821-git-p4-path-variations.sh b/t/t9821-git-p4-path-variations.sh
> index 81e46ac..5a26fec 100755
> --- a/t/t9821-git-p4-path-variations.sh
> +++ b/t/t9821-git-p4-path-variations.sh
> @@ -45,7 +45,7 @@ test_expect_success 'Clone root' '
>         (
>                 cd "$git" &&
>                 git init . &&
> -               git config core.ignorecase false &&
> +               test_config core.ignorecase false &&

test_config ensures that the config setting gets "unset" at the end of
the test, whether the test succeeds or not, so that subsequent tests
are not affected by the setting. However, in this case, since the $git
repository gets recreated from scratch for each test anyhow, use of
test_config is superfluous. In fact, it may be slightly
contraindicated since it could mislead the reader into thinking that
state is carried over from test to test. (Not a big objections, but
something to take into consideration.)

>                 git p4 clone --use-client-spec --destination="$git" //depot &&
>                 # This method is used instead of "test -f" to ensure the case is
>                 # checked even if the test is executed on case-insensitive file systems.
> @@ -67,7 +67,7 @@ test_expect_success 'Clone root (ignorecase)' '
>         (
>                 cd "$git" &&
>                 git init . &&
> -               git config core.ignorecase true &&
> +               test_config core.ignorecase true &&
>                 git p4 clone --use-client-spec --destination="$git" //depot &&
>                 # This method is used instead of "test -f" to ensure the case is
>                 # checked even if the test is executed on case-insensitive file systems.
> @@ -91,7 +91,7 @@ test_expect_success 'Clone root and ignore one file' '
>         (
>                 cd "$git" &&
>                 git init . &&
> -               git config core.ignorecase false &&
> +               test_config core.ignorecase false &&
>                 git p4 clone --use-client-spec --destination="$git" //depot &&
>                 # We ignore one file in the client spec and all path cases change from
>                 # "TO" to "to"!
> @@ -113,7 +113,7 @@ test_expect_success 'Clone root and ignore one file (ignorecase)' '
>         (
>                 cd "$git" &&
>                 git init . &&
> -               git config core.ignorecase true &&
> +               test_config core.ignorecase true &&
>                 git p4 clone --use-client-spec --destination="$git" //depot &&
>                 # We ignore one file in the client spec and all path cases change from
>                 # "TO" to "to"!
> @@ -133,7 +133,7 @@ test_expect_success 'Clone path' '
>         (
>                 cd "$git" &&
>                 git init . &&
> -               git config core.ignorecase false &&
> +               test_config core.ignorecase false &&
>                 git p4 clone --use-client-spec --destination="$git" //depot &&
>                 cat >expect <<-\EOF &&
>                 to/File2.txt
> @@ -149,7 +149,7 @@ test_expect_success 'Clone path (ignorecase)' '
>         (
>                 cd "$git" &&
>                 git init . &&
> -               git config core.ignorecase true &&
> +               test_config core.ignorecase true &&
>                 git p4 clone --use-client-spec --destination="$git" //depot &&
>                 cat >expect <<-\EOF &&
>                 TO/File2.txt
> @@ -180,7 +180,7 @@ test_expect_success 'Add a new file and clone path with new file (ignorecase)' '
>         (
>                 cd "$git" &&
>                 git init . &&
> -               git config core.ignorecase true &&
> +               test_config core.ignorecase true &&
>                 git p4 clone --use-client-spec --destination="$git" //depot &&
>                 cat >expect <<-\EOF &&
>                 to/File0.txt
> --
> 1.9.5 (Apple Git-50.3)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v1] t9821: use test_config
  2015-09-03 13:04   ` Eric Sunshine
@ 2015-09-03 15:13     ` Lars Schneider
  2015-09-03 16:52       ` Junio C Hamano
  0 siblings, 1 reply; 5+ messages in thread
From: Lars Schneider @ 2015-09-03 15:13 UTC (permalink / raw)
  To: Eric Sunshine; +Cc: Git List, Galan Rémi


On 03 Sep 2015, at 15:04, Eric Sunshine <sunshine@sunshineco.com> wrote:

> On Thu, Sep 3, 2015 at 5:34 AM,  <larsxschneider@gmail.com> wrote:
>> From: Lars Schneider <larsxschneider@gmail.com>
>> 
>> Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
>> ---
>> diff --git a/t/t9821-git-p4-path-variations.sh b/t/t9821-git-p4-path-variations.sh
>> index 81e46ac..5a26fec 100755
>> --- a/t/t9821-git-p4-path-variations.sh
>> +++ b/t/t9821-git-p4-path-variations.sh
>> @@ -45,7 +45,7 @@ test_expect_success 'Clone root' '
>>        (
>>                cd "$git" &&
>>                git init . &&
>> -               git config core.ignorecase false &&
>> +               test_config core.ignorecase false &&
> 
> test_config ensures that the config setting gets "unset" at the end of
> the test, whether the test succeeds or not, so that subsequent tests
> are not affected by the setting. However, in this case, since the $git
> repository gets recreated from scratch for each test anyhow, use of
> test_config is superfluous. In fact, it may be slightly
> contraindicated since it could mislead the reader into thinking that
> state is carried over from test to test. (Not a big objections, but
> something to take into consideration.)
OK. Do I need to do anything to take the PATCH suggestion back?
I thanks for the explanation!

Cheers,
Lars

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v1] t9821: use test_config
  2015-09-03 15:13     ` Lars Schneider
@ 2015-09-03 16:52       ` Junio C Hamano
  0 siblings, 0 replies; 5+ messages in thread
From: Junio C Hamano @ 2015-09-03 16:52 UTC (permalink / raw)
  To: Lars Schneider; +Cc: Eric Sunshine, Git List, Galan Rémi

Lars Schneider <larsxschneider@gmail.com> writes:

> On 03 Sep 2015, at 15:04, Eric Sunshine <sunshine@sunshineco.com> wrote:
>
>> On Thu, Sep 3, 2015 at 5:34 AM,  <larsxschneider@gmail.com> wrote:
>>> From: Lars Schneider <larsxschneider@gmail.com>
>>> 
>>> Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
>>> ---
>>> diff --git a/t/t9821-git-p4-path-variations.sh b/t/t9821-git-p4-path-variations.sh
>>> index 81e46ac..5a26fec 100755
>>> --- a/t/t9821-git-p4-path-variations.sh
>>> +++ b/t/t9821-git-p4-path-variations.sh
>>> @@ -45,7 +45,7 @@ test_expect_success 'Clone root' '
>>>        (
>>>                cd "$git" &&
>>>                git init . &&
>>> -               git config core.ignorecase false &&
>>> +               test_config core.ignorecase false &&
>> 
>> test_config ensures that the config setting gets "unset" at the end of
>> the test, whether the test succeeds or not, so that subsequent tests
>> are not affected by the setting. However, in this case, since the $git
>> repository gets recreated from scratch for each test anyhow, use of
>> test_config is superfluous. In fact, it may be slightly
>> contraindicated since it could mislead the reader into thinking that
>> state is carried over from test to test. (Not a big objections, but
>> something to take into consideration.)
> OK. Do I need to do anything to take the PATCH suggestion back?

You can just say "I retract this one because...", which you just
did.

For the path-encoding patch, I think the following is all that is
necessary to be squashed in, but please double check (unless you
have some other improvements you want to make on top of v6 of that
patch, no need to reroll only for the following).

Thanks.


 t/t9822-git-p4-path-encoding.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t9822-git-p4-path-encoding.sh b/t/t9822-git-p4-path-encoding.sh
index e507ad7..3646580 100755
--- a/t/t9822-git-p4-path-encoding.sh
+++ b/t/t9822-git-p4-path-encoding.sh
@@ -39,7 +39,7 @@ test_expect_success 'Clone repo containing iso8859-1 encoded paths with git-p4.p
 	(
 		cd "$git" &&
 		git init . &&
-		test_config git-p4.pathEncoding iso8859-1 &&
+		git config git-p4.pathEncoding iso8859-1 &&
 		git p4 clone --use-client-spec --destination="$git" //depot &&
 		UTF8="$(printf "$UTF8_ESCAPED")" &&
 		echo $UTF8 >expect &&

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-09-03 16:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-03  9:34 [PATCH v1] t9821: use test_config larsxschneider
2015-09-03  9:34 ` larsxschneider
2015-09-03 13:04   ` Eric Sunshine
2015-09-03 15:13     ` Lars Schneider
2015-09-03 16:52       ` Junio C Hamano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.