diff mbox series

[5/7] t3437: fix indendation of the here-doc

Message ID 20210207181439.1178-6-charvi077@gmail.com (mailing list archive)
State New, archived
Headers show
Series Improve the 'fixup [-C | -c]' in interactive rebase | expand

Commit Message

Charvi Mendiratta Feb. 7, 2021, 6:14 p.m. UTC
In the test scripts, the here-doc body and EOF are indented the same
amount as the command which opened the here-doc. Let's remove
one level of indendation.

Original-patch-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Mentored-by: Christian Couder <chriscool@tuxfamily.org>
Mentored-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Charvi Mendiratta <charvi077@gmail.com>
---
 t/t3437-rebase-fixup-options.sh | 62 ++++++++++++++++-----------------
 1 file changed, 31 insertions(+), 31 deletions(-)

Comments

Eric Sunshine Feb. 7, 2021, 6:54 p.m. UTC | #1
On Sun, Feb 7, 2021 at 1:19 PM Charvi Mendiratta <charvi077@gmail.com> wrote:
> In the test scripts, the here-doc body and EOF are indented the same
> amount as the command which opened the here-doc. Let's remove
> one level of indendation.

s/indendation/indentation/

I found "In the test scripts" ambiguous. It isn't clear if you are
talking about all test scripts or the script(s) this patch is fixing
up. Sp, if you happen to re-roll for some reason, perhaps clarify by
saying something like:

    The most common way to format here-docs in Git test scripts is for
    the body and EOF to be indented the same amount as the command
    which opened the here-doc. Fix a few here-docs in this script to
    conform to that standard.

> Original-patch-by: Phillip Wood <phillip.wood@dunelm.org.uk>

I don't think this new patch is based upon Phillip's, so you can
probably drop this attribution.

> Signed-off-by: Charvi Mendiratta <charvi077@gmail.com>
Charvi Mendiratta Feb. 8, 2021, 4:30 a.m. UTC | #2
On Mon, 8 Feb 2021 at 00:24, Eric Sunshine <sunshine@sunshineco.com> wrote:
>
> On Sun, Feb 7, 2021 at 1:19 PM Charvi Mendiratta <charvi077@gmail.com> wrote:
> > In the test scripts, the here-doc body and EOF are indented the same
> > amount as the command which opened the here-doc. Let's remove
> > one level of indendation.
>
> s/indendation/indentation/
>

My spelling mistake, I will fix it.

> I found "In the test scripts" ambiguous. It isn't clear if you are
> talking about all test scripts or the script(s) this patch is fixing
> up. Sp, if you happen to re-roll for some reason, perhaps clarify by
> saying something like:
>
>     The most common way to format here-docs in Git test scripts is for
>     the body and EOF to be indented the same amount as the command
>     which opened the here-doc. Fix a few here-docs in this script to
>     conform to that standard.
>

Okay, will change in the above way.

> > Original-patch-by: Phillip Wood <phillip.wood@dunelm.org.uk>
>
> I don't think this new patch is based upon Phillip's, so you can
> probably drop this attribution.
>

Okay, thanks.
Phillip Wood Feb. 8, 2021, 10:37 a.m. UTC | #3
Hi Chariv and Eric

On 07/02/2021 18:54, Eric Sunshine wrote:
> On Sun, Feb 7, 2021 at 1:19 PM Charvi Mendiratta <charvi077@gmail.com> wrote:
>> In the test scripts, the here-doc body and EOF are indented the same
>> amount as the command which opened the here-doc. Let's remove
>> one level of indendation.
> 
> s/indendation/indentation/
> 
> I found "In the test scripts" ambiguous. It isn't clear if you are
> talking about all test scripts or the script(s) this patch is fixing
> up. Sp, if you happen to re-roll for some reason, perhaps clarify by
> saying something like:
> 
>      The most common way to format here-docs in Git test scripts is for
>      the body and EOF to be indented the same amount as the command
>      which opened the here-doc. Fix a few here-docs in this script to
>      conform to that standard.
> 
>> Original-patch-by: Phillip Wood <phillip.wood@dunelm.org.uk>
> 
> I don't think this new patch is based upon Phillip's, so you can
> probably drop this attribution.

Good point - well spotted as ever Eric

Thanks

Phillip
>> Signed-off-by: Charvi Mendiratta <charvi077@gmail.com>
diff mbox series

Patch

diff --git a/t/t3437-rebase-fixup-options.sh b/t/t3437-rebase-fixup-options.sh
index 36dee15c4b..3de899f68a 100755
--- a/t/t3437-rebase-fixup-options.sh
+++ b/t/t3437-rebase-fixup-options.sh
@@ -38,13 +38,13 @@  get_author () {
 
 test_expect_success 'setup' '
 	cat >message <<-EOF &&
-		amend! B
-		${EMPTY}
-		new subject
-		${EMPTY}
-		new
-		body
-		EOF
+	amend! B
+	${EMPTY}
+	new subject
+	${EMPTY}
+	new
+	body
+	EOF
 
 	sed "1,2d" message >expected-message &&
 
@@ -70,38 +70,38 @@  test_expect_success 'setup' '
 	git commit --fixup=HEAD -a &&
 	test_tick &&
 	git commit --allow-empty -F - <<-EOF &&
-		amend! B
-		${EMPTY}
-		B
-		${EMPTY}
-		edited 1
-		EOF
+	amend! B
+	${EMPTY}
+	B
+	${EMPTY}
+	edited 1
+	EOF
 	test_tick &&
 	git commit --allow-empty -F - <<-EOF &&
-		amend! amend! B
-		${EMPTY}
-		B
-		${EMPTY}
-		edited 1
-		${EMPTY}
-		edited 2
-		EOF
+	amend! amend! B
+	${EMPTY}
+	B
+	${EMPTY}
+	edited 1
+	${EMPTY}
+	edited 2
+	EOF
 	echo B2 >B &&
 	test_tick &&
 	FAKE_COMMIT_AMEND="edited squash" git commit --squash=HEAD -a &&
 	echo B3 >B &&
 	test_tick &&
 	git commit -a -F - <<-EOF &&
-		amend! amend! amend! B
-		${EMPTY}
-		B
-		${EMPTY}
-		edited 1
-		${EMPTY}
-		edited 2
-		${EMPTY}
-		edited 3
-		EOF
+	amend! amend! amend! B
+	${EMPTY}
+	B
+	${EMPTY}
+	edited 1
+	${EMPTY}
+	edited 2
+	${EMPTY}
+	edited 3
+	EOF
 
 	GIT_AUTHOR_NAME="Rebase Author" &&
 	GIT_AUTHOR_EMAIL="rebase.author@example.com" &&