git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perl: also mark git-contacts executable
@ 2025-11-04 18:14 D. Ben Knoble
  2025-11-06  7:22 ` Patrick Steinhardt
  2025-11-11  0:19 ` [PATCH v2] " D. Ben Knoble
  0 siblings, 2 replies; 8+ messages in thread
From: D. Ben Knoble @ 2025-11-04 18:14 UTC (permalink / raw)
  To: git; +Cc: D. Ben Knoble, Junio C Hamano, Patrick Steinhardt

When install git-contacts with Meson via -Dcontrib=contacts, the default
Perl generation fails to mark it executable. As a result, "git contacts"
reports "'contacts' is not a git command."

Unlike generate-script.sh, we aren't testing the basename here; so, glob
the script name in the case arm to match wherever the input comes from.

Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com>
---

Tested like [1]. I was surprised to find my packager didn't have contacts
installed, despite it being requested. But the issue is upstream (here): the
installer doesn't mark the program as executable. I wrote this on top of the
patch in [1], but it should be independent. A quick test says the
prerequisite-patch-id shouldn't bother application?

[1]: https://lore.kernel.org/git/0423F0C4-D0AD-471D-9315-FB208A8171B4@gmail.com/T/#t

 generate-perl.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/generate-perl.sh b/generate-perl.sh
index 65f122ebfc..796d835932 100755
--- a/generate-perl.sh
+++ b/generate-perl.sh
@@ -30,7 +30,7 @@
     "$INPUT" >"$OUTPUT"
 
 case "$INPUT" in
-*.perl)
+*.perl|*git-contacts)
 	chmod a+x "$OUTPUT";;
 *)
 	;;

base-commit: 7f278e958afbf9b7e0727631b4c26dcfa1c63d6e
prerequisite-patch-id: 664e4667d11a226a89da52814505a0c8d31b9fba
-- 
2.48.1


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

* Re: [PATCH] perl: also mark git-contacts executable
  2025-11-04 18:14 [PATCH] perl: also mark git-contacts executable D. Ben Knoble
@ 2025-11-06  7:22 ` Patrick Steinhardt
  2025-11-06 14:07   ` Ben Knoble
  2025-11-11  0:19 ` [PATCH v2] " D. Ben Knoble
  1 sibling, 1 reply; 8+ messages in thread
From: Patrick Steinhardt @ 2025-11-06  7:22 UTC (permalink / raw)
  To: D. Ben Knoble; +Cc: git, Junio C Hamano

On Tue, Nov 04, 2025 at 01:14:57PM -0500, D. Ben Knoble wrote:
> When install git-contacts with Meson via -Dcontrib=contacts, the default

s/install/installing/

> Perl generation fails to mark it executable. As a result, "git contacts"
> reports "'contacts' is not a git command."
> 
> Unlike generate-script.sh, we aren't testing the basename here; so, glob
> the script name in the case arm to match wherever the input comes from.

Yeah, that feels sensibel to me.

> diff --git a/generate-perl.sh b/generate-perl.sh
> index 65f122ebfc..796d835932 100755
> --- a/generate-perl.sh
> +++ b/generate-perl.sh
> @@ -30,7 +30,7 @@
>      "$INPUT" >"$OUTPUT"
>  
>  case "$INPUT" in
> -*.perl)
> +*.perl|*git-contacts)
>  	chmod a+x "$OUTPUT";;
>  *)
>  	;;

And the change looks as expected. An alternative could of course be to
rename the file in-tree to "git-contacts.perl". In that case we wouldn't
require this special case at all. But I guess that this here is good
enough, and there might be other consequences if we renamed the script.

Thanks!

Patrick

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

* Re: [PATCH] perl: also mark git-contacts executable
  2025-11-06  7:22 ` Patrick Steinhardt
@ 2025-11-06 14:07   ` Ben Knoble
  2025-11-06 15:28     ` Junio C Hamano
  0 siblings, 1 reply; 8+ messages in thread
From: Ben Knoble @ 2025-11-06 14:07 UTC (permalink / raw)
  To: Patrick Steinhardt; +Cc: D. Ben Knoble, git, Junio C Hamano



> Le 6 nov. 2025 à 02:22, Patrick Steinhardt <ps@pks.im> a écrit :
> 
> On Tue, Nov 04, 2025 at 01:14:57PM -0500, D. Ben Knoble wrote:
>> When install git-contacts with Meson via -Dcontrib=contacts, the default
> 
> s/install/installing/

Thanks. If Junio doesn’t mind the trivial fix, I’ll avoid sending v2 for now :)

> 
>> Perl generation fails to mark it executable. As a result, "git contacts"
>> reports "'contacts' is not a git command."
>> 
>> Unlike generate-script.sh, we aren't testing the basename here; so, glob
>> the script name in the case arm to match wherever the input comes from.
> 
> Yeah, that feels sensibel to me.
> 
>> diff --git a/generate-perl.sh b/generate-perl.sh
>> index 65f122ebfc..796d835932 100755
>> --- a/generate-perl.sh
>> +++ b/generate-perl.sh
>> @@ -30,7 +30,7 @@
>>     "$INPUT" >"$OUTPUT"
>> 
>> case "$INPUT" in
>> -*.perl)
>> +*.perl|*git-contacts)
>>    chmod a+x "$OUTPUT";;
>> *)
>>    ;;
> 
> And the change looks as expected. An alternative could of course be to
> rename the file in-tree to "git-contacts.perl". In that case we wouldn't
> require this special case at all. But I guess that this here is good
> enough, and there might be other consequences if we renamed the script.

My worry too. 

> Thanks!
> 
> Patrick

Thanks for the review!

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

* Re: [PATCH] perl: also mark git-contacts executable
  2025-11-06 14:07   ` Ben Knoble
@ 2025-11-06 15:28     ` Junio C Hamano
  0 siblings, 0 replies; 8+ messages in thread
From: Junio C Hamano @ 2025-11-06 15:28 UTC (permalink / raw)
  To: Ben Knoble; +Cc: Patrick Steinhardt, D. Ben Knoble, git

Ben Knoble <ben.knoble@gmail.com> writes:

>> Le 6 nov. 2025 à 02:22, Patrick Steinhardt <ps@pks.im> a écrit :
>> 
>> On Tue, Nov 04, 2025 at 01:14:57PM -0500, D. Ben Knoble wrote:
>>> When install git-contacts with Meson via -Dcontrib=contacts, the default
>> 
>> s/install/installing/
>
> Thanks. If Junio doesn’t mind the trivial fix, I’ll avoid sending v2 for now :)

We'd be in pre-release freeze starting with -rc1, so no need to hurry.

>> And the change looks as expected. An alternative could of course be to
>> rename the file in-tree to "git-contacts.perl". In that case we wouldn't
>> require this special case at all. But I guess that this here is good
>> enough, and there might be other consequences if we renamed the script.

Heh, I tend to thnik that consistently naming any Perl source to end
in .perl (and Shell .sh) is the right fix, but anything in contrib/
is allowed to be sloppy ;-)


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

* [PATCH v2] perl: also mark git-contacts executable
  2025-11-04 18:14 [PATCH] perl: also mark git-contacts executable D. Ben Knoble
  2025-11-06  7:22 ` Patrick Steinhardt
@ 2025-11-11  0:19 ` D. Ben Knoble
  2025-11-11 18:59   ` Junio C Hamano
  1 sibling, 1 reply; 8+ messages in thread
From: D. Ben Knoble @ 2025-11-11  0:19 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Patrick Steinhardt, D. Ben Knoble

When installing git-contacts with Meson via -Dcontrib=contacts, the
default Perl generation fails to mark it executable. As a result, "git
contacts" reports "'contacts' is not a git command."

Unlike generate-script.sh, we aren't testing the basename here; so, glob
the script name in the case arm to match wherever the input comes from.

Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com>
---

A small typo fix for the commit message, thanks to Patrick.

v1: https://lore.kernel.org/git/7fbb341e8f05fcde3a1543e3bb4e5a3ec1101692.1762280097.git.ben.knoble+github@gmail.com/

 generate-perl.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/generate-perl.sh b/generate-perl.sh
index 65f122ebfc..796d835932 100755
--- a/generate-perl.sh
+++ b/generate-perl.sh
@@ -30,7 +30,7 @@
     "$INPUT" >"$OUTPUT"
 
 case "$INPUT" in
-*.perl)
+*.perl|*git-contacts)
 	chmod a+x "$OUTPUT";;
 *)
 	;;

Diff-intervalle contre v1 :
1:  7fbb341e8f ! 1:  15f07afcb6 perl: also mark git-contacts executable
    @@ Metadata
      ## Commit message ##
         perl: also mark git-contacts executable
     
    -    When install git-contacts with Meson via -Dcontrib=contacts, the default
    -    Perl generation fails to mark it executable. As a result, "git contacts"
    -    reports "'contacts' is not a git command."
    +    When installing git-contacts with Meson via -Dcontrib=contacts, the
    +    default Perl generation fails to mark it executable. As a result, "git
    +    contacts" reports "'contacts' is not a git command."
     
         Unlike generate-script.sh, we aren't testing the basename here; so, glob
         the script name in the case arm to match wherever the input comes from.

base-commit: 7f278e958afbf9b7e0727631b4c26dcfa1c63d6e
prerequisite-patch-id: 664e4667d11a226a89da52814505a0c8d31b9fba
-- 
2.52.0.rc0.71.g03eda12af0.dirty


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

* Re: [PATCH v2] perl: also mark git-contacts executable
  2025-11-11  0:19 ` [PATCH v2] " D. Ben Knoble
@ 2025-11-11 18:59   ` Junio C Hamano
  2025-11-11 19:00     ` D. Ben Knoble
  0 siblings, 1 reply; 8+ messages in thread
From: Junio C Hamano @ 2025-11-11 18:59 UTC (permalink / raw)
  To: D. Ben Knoble; +Cc: git, Patrick Steinhardt

"D. Ben Knoble" <ben.knoble+github@gmail.com> writes:

> When installing git-contacts with Meson via -Dcontrib=contacts, the
> default Perl generation fails to mark it executable. As a result, "git
> contacts" reports "'contacts' is not a git command."
>
> Unlike generate-script.sh, we aren't testing the basename here; so, glob
> the script name in the case arm to match wherever the input comes from.
>
> Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com>
> ---
>
> A small typo fix for the commit message, thanks to Patrick.
>
> v1: https://lore.kernel.org/git/7fbb341e8f05fcde3a1543e3bb4e5a3ec1101692.1762280097.git.ben.knoble+github@gmail.com/

Together with the html one, these patches match what I have already
queued with local tweaks, so I won't replace them (they are in
'next' now).

Thanks.  


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

* Re: [PATCH v2] perl: also mark git-contacts executable
  2025-11-11 18:59   ` Junio C Hamano
@ 2025-11-11 19:00     ` D. Ben Knoble
  2025-11-11 20:18       ` Junio C Hamano
  0 siblings, 1 reply; 8+ messages in thread
From: D. Ben Knoble @ 2025-11-11 19:00 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Patrick Steinhardt

On Tue, Nov 11, 2025 at 1:59 PM Junio C Hamano <gitster@pobox.com> wrote:
>
> "D. Ben Knoble" <ben.knoble+github@gmail.com> writes:
>
> > When installing git-contacts with Meson via -Dcontrib=contacts, the
> > default Perl generation fails to mark it executable. As a result, "git
> > contacts" reports "'contacts' is not a git command."
> >
> > Unlike generate-script.sh, we aren't testing the basename here; so, glob
> > the script name in the case arm to match wherever the input comes from.
> >
> > Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com>
> > ---
> >
> > A small typo fix for the commit message, thanks to Patrick.
> >
> > v1: https://lore.kernel.org/git/7fbb341e8f05fcde3a1543e3bb4e5a3ec1101692.1762280097.git.ben.knoble+github@gmail.com/
>
> Together with the html one, these patches match what I have already
> queued with local tweaks, so I won't replace them (they are in
> 'next' now).
>
> Thanks.

Ah, sounds good. That was one of the things I wanted to ask by "shall
I send v2 or does Junio mind the trivial fix," and I should have been
more direct.

Thanks.

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

* Re: [PATCH v2] perl: also mark git-contacts executable
  2025-11-11 19:00     ` D. Ben Knoble
@ 2025-11-11 20:18       ` Junio C Hamano
  0 siblings, 0 replies; 8+ messages in thread
From: Junio C Hamano @ 2025-11-11 20:18 UTC (permalink / raw)
  To: D. Ben Knoble; +Cc: git, Patrick Steinhardt

"D. Ben Knoble" <ben.knoble+github@gmail.com> writes:

> On Tue, Nov 11, 2025 at 1:59 PM Junio C Hamano <gitster@pobox.com> wrote:
>>
>> "D. Ben Knoble" <ben.knoble+github@gmail.com> writes:
>>
>> > When installing git-contacts with Meson via -Dcontrib=contacts, the
>> > default Perl generation fails to mark it executable. As a result, "git
>> > contacts" reports "'contacts' is not a git command."
>> >
>> > Unlike generate-script.sh, we aren't testing the basename here; so, glob
>> > the script name in the case arm to match wherever the input comes from.
>> >
>> > Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com>
>> > ---
>> >
>> > A small typo fix for the commit message, thanks to Patrick.
>> >
>> > v1: https://lore.kernel.org/git/7fbb341e8f05fcde3a1543e3bb4e5a3ec1101692.1762280097.git.ben.knoble+github@gmail.com/
>>
>> Together with the html one, these patches match what I have already
>> queued with local tweaks, so I won't replace them (they are in
>> 'next' now).
>>
>> Thanks.
>
> Ah, sounds good. That was one of the things I wanted to ask by "shall
> I send v2 or does Junio mind the trivial fix," and I should have been
> more direct.

No, your question did reach me loud and clear.

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

end of thread, other threads:[~2025-11-11 20:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-04 18:14 [PATCH] perl: also mark git-contacts executable D. Ben Knoble
2025-11-06  7:22 ` Patrick Steinhardt
2025-11-06 14:07   ` Ben Knoble
2025-11-06 15:28     ` Junio C Hamano
2025-11-11  0:19 ` [PATCH v2] " D. Ben Knoble
2025-11-11 18:59   ` Junio C Hamano
2025-11-11 19:00     ` D. Ben Knoble
2025-11-11 20:18       ` 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).