# [PATCH] t/t0015-hash.sh: removed unnecessary '\' at line end

8 messages from 2022-02-08 to 2022-02-10. Participants: Jaydeep P Das, Bagas Sanjaya, Junio C Hamano, jaydeepjd.8914@gmail.com.
Thread: https://gitlist.dev/t/57382

## Jaydeep P Das, 2022-02-08 09:23

Subject: [PATCH] t/t0015-hash.sh: removed unnecessary '\' at line end
Message-ID: <20220208092339.651761-1-jaydeepjd.8914@gmail.com>
URL: https://gitlist.dev/e/20220208092339.651761-1-jaydeepjd.8914%40gmail.com

```
Fixed code as per coding style guide.

Since `|` already implies that the statement is not over, therefore
adding a `\` in the end is not necessary.


```

## Jaydeep P Das, 2022-02-08 09:23

Subject: [PATCH] t/t0015-hash.sh: removed unnecessary '\' at line end
Message-ID: <20220208092339.651761-2-jaydeepjd.8914@gmail.com>
URL: https://gitlist.dev/e/20220208092339.651761-2-jaydeepjd.8914%40gmail.com
In-Reply-To: <20220208092339.651761-1-jaydeepjd.8914@gmail.com>

```
From: Jaydeep Das <jaydeepjd.8914@gmail.com>

The `|` at line end already imples that the statement is not over.
So a `\` after that is redundant.

Signed-off-by: Jaydeep P Das <jaydeepjd.8914@gmail.com>
---
 t/t0015-hash.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/t/t0015-hash.sh b/t/t0015-hash.sh
index 291e9061f3..086822fc45 100755
--- a/t/t0015-hash.sh
+++ b/t/t0015-hash.sh
@@ -15,7 +15,7 @@ test_expect_success 'test basic SHA-1 hash values' '
 	grep c12252ceda8be8994d5fa0290a47231c1d16aae3 actual &&
 	printf "abcdefghijklmnopqrstuvwxyz" | test-tool sha1 >actual &&
 	grep 32d10c7b8cf96570ca04ce37f2a19d84240d3a89 actual &&
-	perl -e "$| = 1; print q{aaaaaaaaaa} for 1..100000;" | \
+	perl -e "$| = 1; print q{aaaaaaaaaa} for 1..100000;" |
 		test-tool sha1 >actual &&
 	grep 34aa973cd4c4daa4f61eeb2bdbad27316534016f actual &&
 	printf "blob 0\0" | test-tool sha1 >actual &&
@@ -38,10 +38,10 @@ test_expect_success 'test basic SHA-256 hash values' '
 	printf "abcdefghijklmnopqrstuvwxyz" | test-tool sha256 >actual &&
 	grep 71c480df93d6ae2f1efad1447c66c9525e316218cf51fc8d9ed832f2daf18b73 actual &&
 	# Try to exercise the chunking code by turning autoflush on.
-	perl -e "$| = 1; print q{aaaaaaaaaa} for 1..100000;" | \
+	perl -e "$| = 1; print q{aaaaaaaaaa} for 1..100000;" |
 		test-tool sha256 >actual &&
 	grep cdc76e5c9914fb9281a1c7e284d73e67f1809a48a497200e046d39ccc7112cd0 actual &&
-	perl -e "$| = 1; print q{abcdefghijklmnopqrstuvwxyz} for 1..100000;" | \
+	perl -e "$| = 1; print q{abcdefghijklmnopqrstuvwxyz} for 1..100000;" |
 		test-tool sha256 >actual &&
 	grep e406ba321ca712ad35a698bf0af8d61fc4dc40eca6bdcea4697962724ccbde35 actual &&
 	printf "blob 0\0" | test-tool sha256 >actual &&
-- 
2.35.1


```

## Bagas Sanjaya, 2022-02-10 01:18

Subject: Re: [PATCH] t/t0015-hash.sh: removed unnecessary '\' at line end
Message-ID: <81e8a217-356d-65cd-3a89-f20ef9c1a5d7@gmail.com>
URL: https://gitlist.dev/e/81e8a217-356d-65cd-3a89-f20ef9c1a5d7%40gmail.com
In-Reply-To: <20220208092339.651761-2-jaydeepjd.8914@gmail.com>

```
On 08/02/22 16.23, Jaydeep P Das wrote:
> From: Jaydeep Das <jaydeepjd.8914@gmail.com>
> 
> The `|` at line end already imples that the statement is not over.
> So a `\` after that is redundant.
> 
> Signed-off-by: Jaydeep P Das <jaydeepjd.8914@gmail.com>
> ---
>   t/t0015-hash.sh | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/t/t0015-hash.sh b/t/t0015-hash.sh
> index 291e9061f3..086822fc45 100755
> --- a/t/t0015-hash.sh
> +++ b/t/t0015-hash.sh
> @@ -15,7 +15,7 @@ test_expect_success 'test basic SHA-1 hash values' '
>   	grep c12252ceda8be8994d5fa0290a47231c1d16aae3 actual &&
>   	printf "abcdefghijklmnopqrstuvwxyz" | test-tool sha1 >actual &&
>   	grep 32d10c7b8cf96570ca04ce37f2a19d84240d3a89 actual &&
> -	perl -e "$| = 1; print q{aaaaaaaaaa} for 1..100000;" | \
> +	perl -e "$| = 1; print q{aaaaaaaaaa} for 1..100000;" |
>   		test-tool sha1 >actual &&
>   	grep 34aa973cd4c4daa4f61eeb2bdbad27316534016f actual &&
>   	printf "blob 0\0" | test-tool sha1 >actual &&
> @@ -38,10 +38,10 @@ test_expect_success 'test basic SHA-256 hash values' '
>   	printf "abcdefghijklmnopqrstuvwxyz" | test-tool sha256 >actual &&
>   	grep 71c480df93d6ae2f1efad1447c66c9525e316218cf51fc8d9ed832f2daf18b73 actual &&
>   	# Try to exercise the chunking code by turning autoflush on.
> -	perl -e "$| = 1; print q{aaaaaaaaaa} for 1..100000;" | \
> +	perl -e "$| = 1; print q{aaaaaaaaaa} for 1..100000;" |
>   		test-tool sha256 >actual &&
>   	grep cdc76e5c9914fb9281a1c7e284d73e67f1809a48a497200e046d39ccc7112cd0 actual &&
> -	perl -e "$| = 1; print q{abcdefghijklmnopqrstuvwxyz} for 1..100000;" | \
> +	perl -e "$| = 1; print q{abcdefghijklmnopqrstuvwxyz} for 1..100000;" |
>   		test-tool sha256 >actual &&
>   	grep e406ba321ca712ad35a698bf0af8d61fc4dc40eca6bdcea4697962724ccbde35 actual &&
>   	printf "blob 0\0" | test-tool sha256 >actual &&

Looks OK.

Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com>

-- 
An old man doll... just what I always wanted! - Clara

```

## Junio C Hamano, 2022-02-10 01:42

Subject: Re: [PATCH] t/t0015-hash.sh: removed unnecessary '\' at line end
Message-ID: <xmqqleyjxzs4.fsf@gitster.g>
URL: https://gitlist.dev/e/xmqqleyjxzs4.fsf%40gitster.g
In-Reply-To: <81e8a217-356d-65cd-3a89-f20ef9c1a5d7@gmail.com>

```
Bagas Sanjaya <bagasdotme@gmail.com> writes:

>> -	perl -e "$| = 1; print q{aaaaaaaaaa} for 1..100000;" | \
>> +	perl -e "$| = 1; print q{aaaaaaaaaa} for 1..100000;" |
>> -	perl -e "$| = 1; print q{aaaaaaaaaa} for 1..100000;" | \
>> +	perl -e "$| = 1; print q{aaaaaaaaaa} for 1..100000;" |
>> -	perl -e "$| = 1; print q{abcdefghijklmnopqrstuvwxyz} for 1..100000;" | \
>> +	perl -e "$| = 1; print q{abcdefghijklmnopqrstuvwxyz} for 1..100000;" |
>>   		test-tool sha256 >actual &&
>>   	grep e406ba321ca712ad35a698bf0af8d61fc4dc40eca6bdcea4697962724ccbde35 actual &&
>>   	printf "blob 0\0" | test-tool sha256 >actual &&
>
> Looks OK.

Yeah, with "removed" -> "remove" on the title, this would look
perfect.

Thanks, both.

```

## jaydeepjd.8914@gmail.com, 2022-02-10 05:52

Subject: Re: [PATCH] t/t0015-hash.sh: removed unnecessary '\' at line end
Message-ID: <c64e52e1-3916-dc7a-60d7-98c324814f0e@gmail.com>
URL: https://gitlist.dev/e/c64e52e1-3916-dc7a-60d7-98c324814f0e%40gmail.com
In-Reply-To: <xmqqleyjxzs4.fsf@gitster.g>

```
Thanks for the feedback.

I have a few more questions regarding contributions. 

I have seen that some command documentations lack consistent synopsis compared to other commands.
Is it on purpose or are improvements to those documentations welcome ?

Also, I have read some mails about "noise" in the mailing list. What does that mean? Does it mean 
very small patches (like mine)? I just want to make sure so that I donot repeat any mistakes :)

```

## Junio C Hamano, 2022-02-10 06:47

Subject: Re: [PATCH] t/t0015-hash.sh: removed unnecessary '\' at line end
Message-ID: <xmqq4k57xlot.fsf@gitster.g>
URL: https://gitlist.dev/e/xmqq4k57xlot.fsf%40gitster.g
In-Reply-To: <c64e52e1-3916-dc7a-60d7-98c324814f0e@gmail.com>

```
jaydeepjd.8914@gmail.com writes:

> Thanks for the feedback.
>
> I have a few more questions regarding contributions. 
> I have seen that some command documentations lack consistent synopsis compared to other commands.
> Is it on purpose or are improvements to those documentations welcome ?

That's hard to answer, as what you perceive as "lack consistent" may
or may not be consistent from other people's perspective, without a
concrete "here is the comparison I am talking about, and this makes
the two comparable" patch.

> Also, I have read some mails about "noise" in the mailing list. What
> does that mean? Does it mean very small patches (like mine)? I just
> want to make sure so that I donot repeat any mistakes :)

"noise", "churn", etc. are used to refer to low value changes that
would interfere, by touching the same area of code or documentation,
other topics that have greater impact.  t0015 seems to be quiescent
right now (no topic in flight fixes or modifies it), so a small-ish
change that does not substantially improve it would not count as
one, at least right now ;-)

```

## jaydeepjd.8914@gmail.com, 2022-02-10 07:11

Subject: Re: [PATCH] t/t0015-hash.sh: removed unnecessary '\' at line end
Message-ID: <bc36eab7-62ae-2e67-aa4f-cceec5c86012@gmail.com>
URL: https://gitlist.dev/e/bc36eab7-62ae-2e67-aa4f-cceec5c86012%40gmail.com
In-Reply-To: <xmqq4k57xlot.fsf@gitster.g>

```
Thanks for the quick response.

> > I have a few more questions regarding contributions.
> > I have seen that some command documentations lack consistent synopsis compared to other commands.
> > Is it on purpose or are improvements to those documentations welcome ?
> 
> That's hard to answer, as what you perceive as "lack consistent" may
> or may not be consistent from other people's perspective, without a
> concrete "here is the comparison I am talking about, and this makes
> the two comparable" patch.


Here is an example. The synopsis of command `send-email` vs synopsis of `commit`:

ˋˋˋ
git send-email [<options>] <file|directory>…​
git send-email [<options>] <format-patch options>
git send-email --dump-aliases
ˋˋˋ

ˋˋˋ
git commit [-a | --interactive | --patch] [-s] [-v] [-u<mode>] [--amend]
	   [--dry-run] [(-c | -C | --squash) <commit> | --fixup [(amend|reword):]<commit>)]
	   [-F <file> | -m <msg>] [--reset-author] [--allow-empty]
	   [--allow-empty-message] [--no-verify] [-e] [--author=<author>]
	   [--date=<date>] [--cleanup=<mode>] [--[no-]status]
	   [-i | -o] [--pathspec-from-file=<file> [--pathspec-file-nul]]
	   [(--trailer <token>[(=|:)<value>])…​] [-S[<keyid>]]
	   [--] [<pathspec>…​]
ˋˋˋ

The `commit` synopsis has a more verbose overview of all the options available compared to `send-email` synopsis.

```

## Junio C Hamano, 2022-02-10 17:20

Subject: Re: [PATCH] t/t0015-hash.sh: removed unnecessary '\' at line end
Message-ID: <xmqq1r0awse5.fsf@gitster.g>
URL: https://gitlist.dev/e/xmqq1r0awse5.fsf%40gitster.g
In-Reply-To: <bc36eab7-62ae-2e67-aa4f-cceec5c86012@gmail.com>

```
jaydeepjd.8914@gmail.com writes:

> Here is an example. The synopsis of command `send-email` vs synopsis of `commit`:
>
> ˋˋˋ
> git send-email [<options>] <file|directory>…​
> git send-email [<options>] <format-patch options>
> git send-email --dump-aliases
> ˋˋˋ
>
> ˋˋˋ
> git commit [-a | --interactive | --patch] [-s] [-v] [-u<mode>] [--amend]
> 	   [--dry-run] [(-c | -C | --squash) <commit> | --fixup [(amend|reword):]<commit>)]
> 	   [-F <file> | -m <msg>] [--reset-author] [--allow-empty]
> 	   [--allow-empty-message] [--no-verify] [-e] [--author=<author>]
> 	   [--date=<date>] [--cleanup=<mode>] [--[no-]status]
> 	   [-i | -o] [--pathspec-from-file=<file> [--pathspec-file-nul]]
> 	   [(--trailer <token>[(=|:)<value>])…​] [-S[<keyid>]]
> 	   [--] [<pathspec>…​]
> ˋˋˋ
>
> The `commit` synopsis has a more verbose overview of all the options available compared to `send-email` synopsis.

I think the former is more modern style that leaves the description
of options to the main text.  It also allows the synopsis section to
make it stand out very different operating modes instead of having
the alternative listed with [ A | B | C ] and having the readers
guess if all combinations of alternatives are valid (they are often
not).

The former style takes more thought to write well, when a command is
multi-purpose and has different operating modes (cf. "git checkout").

For "git commit", even though conceptually creating a totally new
commit and amending the current one are two quite distinct opeating
modes, they pretty much take the same set of options, so I suspect
we can do with just one

	git commit [<options>] [--] [<pathspec>...]

in the modern style, but I dunno (that is why I said "it takes more
thought" and I cannot afford much time to think it through just for
illustration purposes).

Thanks.


```
