threads / patch / 41466

patchUpdate diff-highlight

Subject: [PATCH] Update diff-highlight

## tl;dr

5 messages between Feb 22, 2016 and Feb 26, 2016. Diffs are folded; open one to read it.

replies: 4people: 4as markdown or json

Peter Dave Hello· Feb 22, 2016, 04:14 UTC · lore
From: Peter Dave Hello <peterdavehello@users.noreply.github.com>
Use `#!/usr/bin/env perl` instead of `#!/usr/bin/perl`
So that it can works on FreeBSD.
---
 contrib/diff-highlight/diff-highlight | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to contrib/diff-highlight/diff-highlight +1 −2
diff --git a/contrib/diff-highlight/diff-highlight b/contrib/diff-highlight/diff-highlight
index ffefc31..b57b0fd 100755
--- a/contrib/diff-highlight/diff-highlight
+++ b/contrib/diff-highlight/diff-highlight
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 use 5.008;
 use warnings FATAL => 'all';

--
https://github.com/git/git/pull/200
Eric Sunshine· Feb 22, 2016, 04:49 UTC · re: Peter Dave Hello · lore

Re: [PATCH] Update diff-highlight

On Sun, Feb 21, 2016 at 11:14 PM, Peter Dave Hello <hsu@peterdavehello.org> wrote:

> From: Peter Dave Hello <peterdavehello@users.noreply.github.com>

This "From:" line looks suspiciously incorrect. If anything, you'd probably want to drop the line altogether or use:

    From: Peter Dave Hello <hsu@peterdavehello.org>
> Update diff-highlight

Patches do indeed "update" the project, but this summary line isn't telling us much about intention of this patch. Perhaps rephrase it as:

    contrib/diff-highlight: stop hard-coding perl location
> Use `#!/usr/bin/env perl` instead of `#!/usr/bin/perl`
>
> So that it can works on FreeBSD.
s/works/work/

Also, you probably want to combine those two lines into one proper sentence rather than having one sentence plus a sentence fragment.

Your Signed-off-by: is missing.
Thanks.
Show 17 quoted lines
> ---
>  contrib/diff-highlight/diff-highlight | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/contrib/diff-highlight/diff-highlight b/contrib/diff-highlight/diff-highlight
> index ffefc31..b57b0fd 100755
> --- a/contrib/diff-highlight/diff-highlight
> +++ b/contrib/diff-highlight/diff-highlight
> @@ -1,4 +1,4 @@
> -#!/usr/bin/perl
> +#!/usr/bin/env perl
>
>  use 5.008;
>  use warnings FATAL => 'all';
>
> --
> https://github.com/git/git/pull/200
Peter Dave Hello· Feb 22, 2016, 05:59 UTC · re: Eric Sunshine · lore

Re: [PATCH] Update diff-highlight

Hello Eric,

Thanks for your review and prompt reply, this is my first PR to git, I'll try to update it to follow the conventions.

Best, Peter

--
Now you can follow me on twitter or GitHub :D
2016-02-22 12:49 GMT+08:00 Eric Sunshine <sunshine@sunshineco.com>:
Show 46 quoted lines
> On Sun, Feb 21, 2016 at 11:14 PM, Peter Dave Hello
> <hsu@peterdavehello.org> wrote:
>> From: Peter Dave Hello <peterdavehello@users.noreply.github.com>
>
> This "From:" line looks suspiciously incorrect. If anything, you'd
> probably want to drop the line altogether or use:
>
>     From: Peter Dave Hello <hsu@peterdavehello.org>
>
>> Update diff-highlight
>
> Patches do indeed "update" the project, but this summary line isn't
> telling us much about intention of this patch. Perhaps rephrase it as:
>
>     contrib/diff-highlight: stop hard-coding perl location
>
>> Use `#!/usr/bin/env perl` instead of `#!/usr/bin/perl`
>>
>> So that it can works on FreeBSD.
>
> s/works/work/
>
> Also, you probably want to combine those two lines into one proper
> sentence rather than having one sentence plus a sentence fragment.
>
> Your Signed-off-by: is missing.
>
> Thanks.
>
>> ---
>>  contrib/diff-highlight/diff-highlight | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/contrib/diff-highlight/diff-highlight b/contrib/diff-highlight/diff-highlight
>> index ffefc31..b57b0fd 100755
>> --- a/contrib/diff-highlight/diff-highlight
>> +++ b/contrib/diff-highlight/diff-highlight
>> @@ -1,4 +1,4 @@
>> -#!/usr/bin/perl
>> +#!/usr/bin/env perl
>>
>>  use 5.008;
>>  use warnings FATAL => 'all';
>>
>> --
>> https://github.com/git/git/pull/200
Roberto Tyley· Feb 26, 2016, 09:41 UTC · re: Eric Sunshine · lore

Re: [PATCH] Update diff-highlight

On 22 February 2016 at 04:49, Eric Sunshine <sunshine@sunshineco.com> wrote:
Show 8 quoted lines
> On Sun, Feb 21, 2016 at 11:14 PM, Peter Dave Hello
> <hsu@peterdavehello.org> wrote:
>> From: Peter Dave Hello <peterdavehello@users.noreply.github.com>
>
> This "From:" line looks suspiciously incorrect. If anything, you'd
> probably want to drop the line altogether or use:
>
>     From: Peter Dave Hello <hsu@peterdavehello.org>

Peter's commit (https://github.com/git/git/commit/15415c6e) had an author of 'peterdavehello@users.noreply.github.com' (perhaps because the commit was generated through GitHub's interface?), and submitGit added it as an in-body 'From: ' line because it differed from the address used to send the email (hsu@peterdavehello.org - submitGit always uses the user's primary-email-address-in-GitHub to send the email).

A 'noreply' address is obviously not wanted in this context though, so I've updated submitGit to disregard them when deciding whether or not to generate an in-body 'From: ' header: https://github.com/rtyley/submitgit/pull/29

Roberto
Junio C Hamano· Feb 22, 2016, 07:50 UTC · re: Peter Dave Hello · lore

Re: [PATCH] Update diff-highlight

Peter Dave Hello <hsu@peterdavehello.org> writes:
> From: Peter Dave Hello <peterdavehello@users.noreply.github.com>
>
> Use `#!/usr/bin/env perl` instead of `#!/usr/bin/perl`

Even though there are existing examples in contrib/ parts that use this pattern, we try to avoid use of #!/usr/bin/env in more serious parts of our system. This is to control the exact interpreter used to run our scripts at the build time, and to avoid interference by end users' $PATH environment. So adding more use of #!/usr/bin/env is not quite a welcome move, even if it is to contrib/ part.

Perhaps you can instead mimick the way how contrib/subtree uses the same SHELL_PATH used in the primary Makefile (and config.mak) to turn git-subtree.sh into git-subtree command. Rename the source to diff-highlight.perl, and use PERL_PATH when build procedure turns it into diff-highlight?

I think that is more in line with the rest of the system.

← back to recent threads