All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] t/t0015-hash.sh: removed unnecessary '\' at line end
@ 2022-02-08  9:23 Jaydeep P Das
  2022-02-08  9:23 ` Jaydeep P Das
  0 siblings, 1 reply; 8+ messages in thread
From: Jaydeep P Das @ 2022-02-08  9:23 UTC (permalink / raw)
  To: git

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.


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

* [PATCH] t/t0015-hash.sh: removed unnecessary '\' at line end
  2022-02-08  9:23 [PATCH] t/t0015-hash.sh: removed unnecessary '\' at line end Jaydeep P Das
@ 2022-02-08  9:23 ` Jaydeep P Das
  2022-02-10  1:18   ` Bagas Sanjaya
  0 siblings, 1 reply; 8+ messages in thread
From: Jaydeep P Das @ 2022-02-08  9:23 UTC (permalink / raw)
  To: git; +Cc: Jaydeep Das

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


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

* Re: [PATCH] t/t0015-hash.sh: removed unnecessary '\' at line end
  2022-02-08  9:23 ` Jaydeep P Das
@ 2022-02-10  1:18   ` Bagas Sanjaya
  2022-02-10  1:42     ` Junio C Hamano
  0 siblings, 1 reply; 8+ messages in thread
From: Bagas Sanjaya @ 2022-02-10  1:18 UTC (permalink / raw)
  To: Jaydeep P Das, git

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

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

* Re: [PATCH] t/t0015-hash.sh: removed unnecessary '\' at line end
  2022-02-10  1:18   ` Bagas Sanjaya
@ 2022-02-10  1:42     ` Junio C Hamano
  2022-02-10  5:52       ` jaydeepjd.8914
  0 siblings, 1 reply; 8+ messages in thread
From: Junio C Hamano @ 2022-02-10  1:42 UTC (permalink / raw)
  To: Bagas Sanjaya; +Cc: Jaydeep P Das, git

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.

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

* Re: [PATCH] t/t0015-hash.sh: removed unnecessary '\' at line end
  2022-02-10  1:42     ` Junio C Hamano
@ 2022-02-10  5:52       ` jaydeepjd.8914
  2022-02-10  6:47         ` Junio C Hamano
  0 siblings, 1 reply; 8+ messages in thread
From: jaydeepjd.8914 @ 2022-02-10  5:52 UTC (permalink / raw)
  To: Junio C Hamano, Bagas Sanjaya, git

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 :)

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

* Re: [PATCH] t/t0015-hash.sh: removed unnecessary '\' at line end
  2022-02-10  5:52       ` jaydeepjd.8914
@ 2022-02-10  6:47         ` Junio C Hamano
  2022-02-10  7:11           ` jaydeepjd.8914
  0 siblings, 1 reply; 8+ messages in thread
From: Junio C Hamano @ 2022-02-10  6:47 UTC (permalink / raw)
  To: jaydeepjd.8914; +Cc: Bagas Sanjaya, git

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 ;-)

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

* Re: [PATCH] t/t0015-hash.sh: removed unnecessary '\' at line end
  2022-02-10  6:47         ` Junio C Hamano
@ 2022-02-10  7:11           ` jaydeepjd.8914
  2022-02-10 17:20             ` Junio C Hamano
  0 siblings, 1 reply; 8+ messages in thread
From: jaydeepjd.8914 @ 2022-02-10  7:11 UTC (permalink / raw)
  To: Junio C Hamano, Bagas Sanjaya, git

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.

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

* Re: [PATCH] t/t0015-hash.sh: removed unnecessary '\' at line end
  2022-02-10  7:11           ` jaydeepjd.8914
@ 2022-02-10 17:20             ` Junio C Hamano
  0 siblings, 0 replies; 8+ messages in thread
From: Junio C Hamano @ 2022-02-10 17:20 UTC (permalink / raw)
  To: jaydeepjd.8914; +Cc: Bagas Sanjaya, git

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.


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

end of thread, other threads:[~2022-02-10 17:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-08  9:23 [PATCH] t/t0015-hash.sh: removed unnecessary '\' at line end Jaydeep P Das
2022-02-08  9:23 ` Jaydeep P Das
2022-02-10  1:18   ` Bagas Sanjaya
2022-02-10  1:42     ` Junio C Hamano
2022-02-10  5:52       ` jaydeepjd.8914
2022-02-10  6:47         ` Junio C Hamano
2022-02-10  7:11           ` jaydeepjd.8914
2022-02-10 17:20             ` 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.