# [PATCH] perl: also mark git-contacts executable

8 messages from 2025-11-04 to 2025-11-11. Participants: D. Ben Knoble, Patrick Steinhardt, Ben Knoble, Junio C Hamano.
Thread: https://gitlist.dev/t/64439

## D. Ben Knoble, 2025-11-04 18:14

Subject: [PATCH] perl: also mark git-contacts executable
Message-ID: <7fbb341e8f05fcde3a1543e3bb4e5a3ec1101692.1762280097.git.ben.knoble+github@gmail.com>
URL: https://gitlist.dev/e/7fbb341e8f05fcde3a1543e3bb4e5a3ec1101692.1762280097.git.ben.knoble%2Bgithub%40gmail.com

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


```

## Patrick Steinhardt, 2025-11-06 07:22

Subject: Re: [PATCH] perl: also mark git-contacts executable
Message-ID: <aQxMmnzPR6swvG-d@pks.im>
URL: https://gitlist.dev/e/aQxMmnzPR6swvG-d%40pks.im
In-Reply-To: <7fbb341e8f05fcde3a1543e3bb4e5a3ec1101692.1762280097.git.ben.knoble+github@gmail.com>

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

```

## Ben Knoble, 2025-11-06 14:07

Subject: Re: [PATCH] perl: also mark git-contacts executable
Message-ID: <87BB8F6A-7176-4C51-9F36-BA613E7D8B08@gmail.com>
URL: https://gitlist.dev/e/87BB8F6A-7176-4C51-9F36-BA613E7D8B08%40gmail.com
In-Reply-To: <aQxMmnzPR6swvG-d@pks.im>

```


> 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!
```

## Junio C Hamano, 2025-11-06 15:28

Subject: Re: [PATCH] perl: also mark git-contacts executable
Message-ID: <xmqqikfnji40.fsf@gitster.g>
URL: https://gitlist.dev/e/xmqqikfnji40.fsf%40gitster.g
In-Reply-To: <87BB8F6A-7176-4C51-9F36-BA613E7D8B08@gmail.com>

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


```

## D. Ben Knoble, 2025-11-11 00:19

Subject: [PATCH v2] perl: also mark git-contacts executable
Message-ID: <15f07afcb66a900e5391e6b07e0701ce84236f04.1762820188.git.ben.knoble+github@gmail.com>
URL: https://gitlist.dev/e/15f07afcb66a900e5391e6b07e0701ce84236f04.1762820188.git.ben.knoble%2Bgithub%40gmail.com
In-Reply-To: <7fbb341e8f05fcde3a1543e3bb4e5a3ec1101692.1762280097.git.ben.knoble+github@gmail.com>

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


```

## Junio C Hamano, 2025-11-11 18:59

Subject: Re: [PATCH v2] perl: also mark git-contacts executable
Message-ID: <xmqqqzu4wg3u.fsf@gitster.g>
URL: https://gitlist.dev/e/xmqqqzu4wg3u.fsf%40gitster.g
In-Reply-To: <15f07afcb66a900e5391e6b07e0701ce84236f04.1762820188.git.ben.knoble+github@gmail.com>

```
"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.  


```

## D. Ben Knoble, 2025-11-11 19:00

Subject: Re: [PATCH v2] perl: also mark git-contacts executable
Message-ID: <CALnO6CA2uLjWg_kwbaEGd+TZP4qQEBMus6HRVbo7Bz9oHdoYxA@mail.gmail.com>
URL: https://gitlist.dev/e/CALnO6CA2uLjWg_kwbaEGd%2BTZP4qQEBMus6HRVbo7Bz9oHdoYxA%40mail.gmail.com
In-Reply-To: <xmqqqzu4wg3u.fsf@gitster.g>

```
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.

```

## Junio C Hamano, 2025-11-11 20:18

Subject: Re: [PATCH v2] perl: also mark git-contacts executable
Message-ID: <xmqqcy5owcel.fsf@gitster.g>
URL: https://gitlist.dev/e/xmqqcy5owcel.fsf%40gitster.g
In-Reply-To: <CALnO6CA2uLjWg_kwbaEGd+TZP4qQEBMus6HRVbo7Bz9oHdoYxA@mail.gmail.com>

```
"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.

```
