git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Update diff-highlight
@ 2016-02-22  4:14 Peter Dave Hello
  2016-02-22  4:49 ` Eric Sunshine
  2016-02-22  7:50 ` Junio C Hamano
  0 siblings, 2 replies; 5+ messages in thread
From: Peter Dave Hello @ 2016-02-22  4:14 UTC (permalink / raw)
  To: git

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

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

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

* Re: [PATCH] Update diff-highlight
  2016-02-22  4:14 [PATCH] Update diff-highlight Peter Dave Hello
@ 2016-02-22  4:49 ` Eric Sunshine
  2016-02-22  5:59   ` Peter Dave Hello
  2016-02-26  9:41   ` Roberto Tyley
  2016-02-22  7:50 ` Junio C Hamano
  1 sibling, 2 replies; 5+ messages in thread
From: Eric Sunshine @ 2016-02-22  4:49 UTC (permalink / raw)
  To: Peter Dave Hello; +Cc: Git List

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

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

* Re: [PATCH] Update diff-highlight
  2016-02-22  4:49 ` Eric Sunshine
@ 2016-02-22  5:59   ` Peter Dave Hello
  2016-02-26  9:41   ` Roberto Tyley
  1 sibling, 0 replies; 5+ messages in thread
From: Peter Dave Hello @ 2016-02-22  5:59 UTC (permalink / raw)
  To: Eric Sunshine; +Cc: Peter Dave Hello, Git List

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

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

* Re: [PATCH] Update diff-highlight
  2016-02-22  4:14 [PATCH] Update diff-highlight Peter Dave Hello
  2016-02-22  4:49 ` Eric Sunshine
@ 2016-02-22  7:50 ` Junio C Hamano
  1 sibling, 0 replies; 5+ messages in thread
From: Junio C Hamano @ 2016-02-22  7:50 UTC (permalink / raw)
  To: Peter Dave Hello; +Cc: git

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.

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

* Re: [PATCH] Update diff-highlight
  2016-02-22  4:49 ` Eric Sunshine
  2016-02-22  5:59   ` Peter Dave Hello
@ 2016-02-26  9:41   ` Roberto Tyley
  1 sibling, 0 replies; 5+ messages in thread
From: Roberto Tyley @ 2016-02-26  9:41 UTC (permalink / raw)
  To: Eric Sunshine; +Cc: Peter Dave Hello, Git List

On 22 February 2016 at 04:49, Eric Sunshine <sunshine@sunshineco.com> wrote:
> 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

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

end of thread, other threads:[~2016-02-26  9:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-22  4:14 [PATCH] Update diff-highlight Peter Dave Hello
2016-02-22  4:49 ` Eric Sunshine
2016-02-22  5:59   ` Peter Dave Hello
2016-02-26  9:41   ` Roberto Tyley
2016-02-22  7:50 ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).