All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] t4200: drop irrelevant code
@ 2022-07-18 15:43 Martin Ågren
  2022-07-18 18:01 ` Junio C Hamano
  2022-07-19  5:21 ` Eric Sunshine
  0 siblings, 2 replies; 3+ messages in thread
From: Martin Ågren @ 2022-07-18 15:43 UTC (permalink / raw)
  To: git; +Cc: Eric Sunshine

While setting up an unresolved merge for `git rerere`, we run `git
rev-parse` and `git fmt-merge-msg` to create a variable `$fifth` and a
commit-message file `msg`, which we then never actually use. This has
been like that since these tests were added in 672d1b789b ("rerere:
migrate to parse-options API", 2010-08-05). This does exercise `git
rev-parse` and `git fmt-merge-msg`, but doesn't contribute to testing
`git rerere`. Drop these lines.

Reported-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Martin Ågren <martin.agren@gmail.com>
---
 This is quite late fallout from Eric's review [1] of some commits that
 have already gone in.

 [1] https://lore.kernel.org/git/CAPig+cSjHg2-WYqdkZAS0ye1goj_=5RN3mdjt0-4kSBqNm6WLg@mail.gmail.com/

 t/t4200-rerere.sh | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/t/t4200-rerere.sh b/t/t4200-rerere.sh
index 9f8c76dffb..7025cfdae5 100755
--- a/t/t4200-rerere.sh
+++ b/t/t4200-rerere.sh
@@ -358,23 +358,20 @@ test_expect_success 'set up an unresolved merge' '
 	headblob=$(git rev-parse version2:file3) &&
 	mergeblob=$(git rev-parse fifth:file3) &&
 	cat >expected.unresolved <<-EOF &&
 	100644 $headblob 2	file3
 	100644 $mergeblob 3	file3
 	EOF
 
 	test_might_fail git config --unset rerere.autoupdate &&
 	git reset --hard &&
 	git checkout version2 &&
-	fifth=$(git rev-parse fifth) &&
-	echo "$fifth		branch fifth of ." |
-	git fmt-merge-msg >msg &&
 	ancestor=$(git merge-base version2 fifth) &&
 	test_must_fail git merge-recursive "$ancestor" -- HEAD fifth &&
 
 	git ls-files --stage >failedmerge &&
 	cp file3 file3.conflict &&
 
 	git ls-files -u >actual &&
 	test_cmp expected.unresolved actual
 '
 
-- 
2.37.1.373.g4dd4a117ec


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

* Re: [PATCH] t4200: drop irrelevant code
  2022-07-18 15:43 [PATCH] t4200: drop irrelevant code Martin Ågren
@ 2022-07-18 18:01 ` Junio C Hamano
  2022-07-19  5:21 ` Eric Sunshine
  1 sibling, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2022-07-18 18:01 UTC (permalink / raw)
  To: Martin Ågren; +Cc: git, Eric Sunshine

Martin Ågren <martin.agren@gmail.com> writes:

> While setting up an unresolved merge for `git rerere`, we run `git
> rev-parse` and `git fmt-merge-msg` to create a variable `$fifth` and a
> commit-message file `msg`, which we then never actually use. This has
> been like that since these tests were added in 672d1b789b ("rerere:
> migrate to parse-options API", 2010-08-05). This does exercise `git
> rev-parse` and `git fmt-merge-msg`, but doesn't contribute to testing
> `git rerere`. Drop these lines.

Very well reasoned.

Will queue, thanks. 

> Reported-by: Eric Sunshine <sunshine@sunshineco.com>
> Signed-off-by: Martin Ågren <martin.agren@gmail.com>
> ---
>  This is quite late fallout from Eric's review [1] of some commits that
>  have already gone in.
>
>  [1] https://lore.kernel.org/git/CAPig+cSjHg2-WYqdkZAS0ye1goj_=5RN3mdjt0-4kSBqNm6WLg@mail.gmail.com/
>
>  t/t4200-rerere.sh | 3 ---
>  1 file changed, 3 deletions(-)
>
> diff --git a/t/t4200-rerere.sh b/t/t4200-rerere.sh
> index 9f8c76dffb..7025cfdae5 100755
> --- a/t/t4200-rerere.sh
> +++ b/t/t4200-rerere.sh
> @@ -358,23 +358,20 @@ test_expect_success 'set up an unresolved merge' '
>  	headblob=$(git rev-parse version2:file3) &&
>  	mergeblob=$(git rev-parse fifth:file3) &&
>  	cat >expected.unresolved <<-EOF &&
>  	100644 $headblob 2	file3
>  	100644 $mergeblob 3	file3
>  	EOF
>  
>  	test_might_fail git config --unset rerere.autoupdate &&
>  	git reset --hard &&
>  	git checkout version2 &&
> -	fifth=$(git rev-parse fifth) &&
> -	echo "$fifth		branch fifth of ." |
> -	git fmt-merge-msg >msg &&
>  	ancestor=$(git merge-base version2 fifth) &&
>  	test_must_fail git merge-recursive "$ancestor" -- HEAD fifth &&
>  
>  	git ls-files --stage >failedmerge &&
>  	cp file3 file3.conflict &&
>  
>  	git ls-files -u >actual &&
>  	test_cmp expected.unresolved actual
>  '

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

* Re: [PATCH] t4200: drop irrelevant code
  2022-07-18 15:43 [PATCH] t4200: drop irrelevant code Martin Ågren
  2022-07-18 18:01 ` Junio C Hamano
@ 2022-07-19  5:21 ` Eric Sunshine
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Sunshine @ 2022-07-19  5:21 UTC (permalink / raw)
  To: Martin Ågren; +Cc: Git List

On Mon, Jul 18, 2022 at 11:45 AM Martin Ågren <martin.agren@gmail.com> wrote:
> While setting up an unresolved merge for `git rerere`, we run `git
> rev-parse` and `git fmt-merge-msg` to create a variable `$fifth` and a
> commit-message file `msg`, which we then never actually use. This has
> been like that since these tests were added in 672d1b789b ("rerere:
> migrate to parse-options API", 2010-08-05). This does exercise `git
> rev-parse` and `git fmt-merge-msg`, but doesn't contribute to testing
> `git rerere`. Drop these lines.
>
> Reported-by: Eric Sunshine <sunshine@sunshineco.com>
> Signed-off-by: Martin Ågren <martin.agren@gmail.com>
> ---
>  This is quite late fallout from Eric's review [1] of some commits that
>  have already gone in.
>
>  [1] https://lore.kernel.org/git/CAPig+cSjHg2-WYqdkZAS0ye1goj_=5RN3mdjt0-4kSBqNm6WLg@mail.gmail.com/

Thanks for following up on this. The patch looks fine.

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

end of thread, other threads:[~2022-07-19  5:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-18 15:43 [PATCH] t4200: drop irrelevant code Martin Ågren
2022-07-18 18:01 ` Junio C Hamano
2022-07-19  5:21 ` Eric Sunshine

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.