Skip to content

gitattributes: fix eol attribute for Perl scripts#2151

Open
ktwu01 wants to merge 1 commit into
gitgitgadget:masterfrom
ktwu01:kw/fix-pl-eol-attribute
Open

gitattributes: fix eol attribute for Perl scripts#2151
ktwu01 wants to merge 1 commit into
gitgitgadget:masterfrom
ktwu01:kw/fix-pl-eol-attribute

Conversation

@ktwu01

@ktwu01 ktwu01 commented Jun 14, 2026

Copy link
Copy Markdown

cc: Patrick Steinhardt ps@pks.im

@ktwu01

ktwu01 commented Jun 14, 2026

Copy link
Copy Markdown
Author

/preview

@gitgitgadget

gitgitgadget Bot commented Jun 14, 2026

Copy link
Copy Markdown

Error: User ktwu01 is not yet permitted to use GitGitGadget

@ktwu01

ktwu01 commented Jun 14, 2026

Copy link
Copy Markdown
Author

This is my first GitGitGadget PR. Could an authorized GitGitGadget user please allow @ktwu01 to use GitGitGadget? Thank you.

@mmontalbo

Copy link
Copy Markdown

/allow

@gitgitgadget

gitgitgadget Bot commented Jun 15, 2026

Copy link
Copy Markdown

User ktwu01 is now allowed to use GitGitGadget.

WARNING: ktwu01 has no public email address set on GitHub; GitGitGadget needs an email address to Cc: you on your contribution, so that you receive any feedback on the Git mailing list. Go to https://github.com/settings/profile to make your preferred email public to let GitGitGadget know which email address to use.

@ktwu01

ktwu01 commented Jun 15, 2026

Copy link
Copy Markdown
Author

/preview

@gitgitgadget

gitgitgadget Bot commented Jun 15, 2026

Copy link
Copy Markdown

Preview email sent as pull.2151.git.1781497375965.gitgitgadget@gmail.com

@ktwu01

ktwu01 commented Jun 15, 2026

Copy link
Copy Markdown
Author

/submit

@gitgitgadget

gitgitgadget Bot commented Jun 15, 2026

Copy link
Copy Markdown

Submitted as pull.2151.git.1781497525828.gitgitgadget@gmail.com

To fetch this version into FETCH_HEAD:

git fetch https://github.com/gitgitgadget/git/ pr-2151/ktwu01/kw/fix-pl-eol-attribute-v1

To fetch this version to local tag pr-2151/ktwu01/kw/fix-pl-eol-attribute-v1:

git fetch --no-tags https://github.com/gitgitgadget/git/ tag pr-2151/ktwu01/kw/fix-pl-eol-attribute-v1

The *.pl pattern currently sets eof=lf, which is not a built-in
attribute used for line-ending normalization.

Use eol=lf instead, matching the neighboring *.perl and *.pm rules, so
Perl scripts are checked out with LF line endings.

Signed-off-by: Koutian Wu <ktwu01@gmail.com>
@ktwu01 ktwu01 force-pushed the kw/fix-pl-eol-attribute branch from 92ba4d4 to f4b4ca3 Compare June 15, 2026 07:50
@ktwu01

ktwu01 commented Jun 15, 2026

Copy link
Copy Markdown
Author

/preview

@gitgitgadget

gitgitgadget Bot commented Jun 15, 2026

Copy link
Copy Markdown

Preview email sent as pull.2151.v2.git.1781509941958.gitgitgadget@gmail.com

@ktwu01

ktwu01 commented Jun 15, 2026

Copy link
Copy Markdown
Author

/submit

@gitgitgadget

gitgitgadget Bot commented Jun 15, 2026

Copy link
Copy Markdown

Submitted as pull.2151.v2.git.1781510039164.gitgitgadget@gmail.com

To fetch this version into FETCH_HEAD:

git fetch https://github.com/gitgitgadget/git/ pr-2151/ktwu01/kw/fix-pl-eol-attribute-v2

To fetch this version to local tag pr-2151/ktwu01/kw/fix-pl-eol-attribute-v2:

git fetch --no-tags https://github.com/gitgitgadget/git/ tag pr-2151/ktwu01/kw/fix-pl-eol-attribute-v2

@gitgitgadget

gitgitgadget Bot commented Jun 15, 2026

Copy link
Copy Markdown

Patrick Steinhardt wrote on the Git mailing list (how to reply to this email):

On Mon, Jun 15, 2026 at 04:25:25AM +0000, Koutian Wu via GitGitGadget wrote:
> From: ktwu01 <ktwu01@gmail.com>
> 
> The *.pl pattern currently sets eof=lf, which is not a built-in
> attribute used for line-ending normalization.
> 
> Use eol=lf instead, matching the neighboring *.perl and *.pm rules, so
> Perl scripts are checked out with LF line endings.
> 
> Signed-off-by: ktwu01 <ktwu01@gmail.com>

The Signed-off-by and commit author should use your real name, if
possible. See [1].

> diff --git a/.gitattributes b/.gitattributes
> index 556322be01..26490ad60a 100644
> --- a/.gitattributes
> +++ b/.gitattributes
> @@ -2,7 +2,7 @@
>  *.[ch] whitespace=indent,trail,space,incomplete diff=cpp
>  *.sh whitespace=indent,trail,space,incomplete text eol=lf
>  *.perl text eol=lf diff=perl
> -*.pl text eof=lf diff=perl
> +*.pl text eol=lf diff=perl
>  *.pm text eol=lf diff=perl
>  *.py text eol=lf diff=python
>  *.bat text eol=crlf

Yeah, this looks obviously correct to me. Thanks for the fix!

Patrick

[1]: https://git-scm.com/docs/SubmittingPatches#real-name

@gitgitgadget

gitgitgadget Bot commented Jun 15, 2026

Copy link
Copy Markdown

User Patrick Steinhardt <ps@pks.im> has been added to the cc: list.

@gitgitgadget

gitgitgadget Bot commented Jun 15, 2026

Copy link
Copy Markdown

Patrick Steinhardt wrote on the Git mailing list (how to reply to this email):

On Mon, Jun 15, 2026 at 07:53:58AM +0000, Koutian Wu via GitGitGadget wrote:
> Range-diff vs v1:
> 
>  1:  92ba4d499d ! 1:  f4b4ca30c7 gitattributes: fix eol attribute for Perl scripts
>      @@
>        ## Metadata ##
>      -Author: ktwu01 <ktwu01@gmail.com>
>      +Author: Koutian Wu <ktwu01@gmail.com>
>       
>        ## Commit message ##
>           gitattributes: fix eol attribute for Perl scripts
>      @@ Commit message
>           Use eol=lf instead, matching the neighboring *.perl and *.pm rules, so
>           Perl scripts are checked out with LF line endings.
>       
>      -    Signed-off-by: ktwu01 <ktwu01@gmail.com>
>      +    Signed-off-by: Koutian Wu <ktwu01@gmail.com>
>       
>        ## .gitattributes ##
>       @@

Thanks, this version looks good to me!

Patrick

@gitgitgadget

gitgitgadget Bot commented Jun 15, 2026

Copy link
Copy Markdown

Junio C Hamano wrote on the Git mailing list (how to reply to this email):

"Koutian Wu via GitGitGadget" <gitgitgadget@gmail.com> writes:

> From: ktwu01 <ktwu01@gmail.com>
> ...
> Signed-off-by: ktwu01 <ktwu01@gmail.com>
> ---

Thanks.

This typo come from 1f34e0cd (.gitattributes: include `text`
attribute for eol attributes, 2023-02-03), that added "text" to
those entries with eol=lf, which inherited from 20460635
(.gitattributes: use the "perl" differ for Perl, 2018-04-26), which
inherited it while it was adding diff=perl from 00acdbc6
(.gitattributes: add *.pl extension for Perl, 2018-04-26) that added
the .pl pattern.  It is interesting that nobody seems to have
noticed the typo during the reviews of these three patches that
touched these lines ;-).

By the way, we'd prefer to interact with humans with real sounding
names rather than handles, especially when it is not particularly
secret.  Your authorship and sign-off information will blend better
in the community if you used "Koutian Wu".


> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-2151%2Fktwu01%2Fkw%2Ffix-pl-eol-attribute-v1
> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2151/ktwu01/kw/fix-pl-eol-attribute-v1
> Pull-Request: https://github.com/gitgitgadget/git/pull/2151
>
>  .gitattributes | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/.gitattributes b/.gitattributes
> index 556322be01..26490ad60a 100644
> --- a/.gitattributes
> +++ b/.gitattributes
> @@ -2,7 +2,7 @@
>  *.[ch] whitespace=indent,trail,space,incomplete diff=cpp
>  *.sh whitespace=indent,trail,space,incomplete text eol=lf
>  *.perl text eol=lf diff=perl
> -*.pl text eof=lf diff=perl
> +*.pl text eol=lf diff=perl
>  *.pm text eol=lf diff=perl
>  *.py text eol=lf diff=python
>  *.bat text eol=crlf
>
> base-commit: ea97ad8d017de0c9037451a78008a0fd60abea0c

@gitgitgadget

gitgitgadget Bot commented Jun 15, 2026

Copy link
Copy Markdown

This patch series was integrated into seen via git@ffc2364.

@gitgitgadget gitgitgadget Bot added the seen label Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants