git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH 0/3] enable userdiff for more things in git.git
@ 2018-04-26  7:50 Ævar Arnfjörð Bjarmason
  2018-04-26  7:50 ` [PATCH 1/3] .gitattributes: add *.pl extension for Perl Ævar Arnfjörð Bjarmason
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2018-04-26  7:50 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

A noticed that git.git doesn't have userdiff enabled for perl files,
and looking over some recent patches this gave better results, while
I'm at it add one for Python too. I couldn't find anything in
gitattributes(5) that was worth the bother of enabling this (e.g. we
just have one Ruby file).

Ævar Arnfjörð Bjarmason (3):
  .gitattributes: add *.pl extension for Perl
  .gitattributes: use the "perl" differ for Perl
  .gitattributes: add a diff driver for Python

 .gitattributes | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

-- 
2.17.0.290.gded63e768a


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

* [PATCH 1/3] .gitattributes: add *.pl extension for Perl
  2018-04-26  7:50 [PATCH 0/3] enable userdiff for more things in git.git Ævar Arnfjörð Bjarmason
@ 2018-04-26  7:50 ` Ævar Arnfjörð Bjarmason
  2018-04-26  7:50 ` [PATCH 2/3] .gitattributes: use the "perl" differ " Ævar Arnfjörð Bjarmason
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2018-04-26  7:50 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

Change the list of Perl extensions added in 00ddc9d13c ("Fix build
with core.autocrlf=true", 2017-05-09) to also include *.pl, we have
some of those in the tree, e.g. in t/.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 .gitattributes | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitattributes b/.gitattributes
index 8ce9c6b888..482af05a6a 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -2,6 +2,7 @@
 *.[ch] whitespace=indent,trail,space diff=cpp
 *.sh whitespace=indent,trail,space eol=lf
 *.perl eol=lf
+*.pl eof=lf
 *.pm eol=lf
 /Documentation/git-*.txt eol=lf
 /command-list.txt eol=lf
-- 
2.17.0.290.gded63e768a


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

* [PATCH 2/3] .gitattributes: use the "perl" differ for Perl
  2018-04-26  7:50 [PATCH 0/3] enable userdiff for more things in git.git Ævar Arnfjörð Bjarmason
  2018-04-26  7:50 ` [PATCH 1/3] .gitattributes: add *.pl extension for Perl Ævar Arnfjörð Bjarmason
@ 2018-04-26  7:50 ` Ævar Arnfjörð Bjarmason
  2018-04-26  7:50 ` [PATCH 3/3] .gitattributes: add a diff driver for Python Ævar Arnfjörð Bjarmason
  2018-04-26  9:43 ` [PATCH 0/3] enable userdiff for more things in git.git Junio C Hamano
  3 siblings, 0 replies; 5+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2018-04-26  7:50 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

As noted in gitattributes(5) this gives better patch context for these
types of files.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 .gitattributes | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/.gitattributes b/.gitattributes
index 482af05a6a..aa08dd219d 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,9 +1,9 @@
 * whitespace=!indent,trail,space
 *.[ch] whitespace=indent,trail,space diff=cpp
 *.sh whitespace=indent,trail,space eol=lf
-*.perl eol=lf
-*.pl eof=lf
-*.pm eol=lf
+*.perl eol=lf diff=perl
+*.pl eof=lf diff=perl
+*.pm eol=lf diff=perl
 /Documentation/git-*.txt eol=lf
 /command-list.txt eol=lf
 /GIT-VERSION-GEN eol=lf
-- 
2.17.0.290.gded63e768a


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

* [PATCH 3/3] .gitattributes: add a diff driver for Python
  2018-04-26  7:50 [PATCH 0/3] enable userdiff for more things in git.git Ævar Arnfjörð Bjarmason
  2018-04-26  7:50 ` [PATCH 1/3] .gitattributes: add *.pl extension for Perl Ævar Arnfjörð Bjarmason
  2018-04-26  7:50 ` [PATCH 2/3] .gitattributes: use the "perl" differ " Ævar Arnfjörð Bjarmason
@ 2018-04-26  7:50 ` Ævar Arnfjörð Bjarmason
  2018-04-26  9:43 ` [PATCH 0/3] enable userdiff for more things in git.git Junio C Hamano
  3 siblings, 0 replies; 5+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2018-04-26  7:50 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

Declare that the *.py files in our tree are Python for the purposes of
diffing, and as in 00ddc9d13c ("Fix build with core.autocrlf=true",
2017-05-09) set eol=lf on them, which makes sense like with the *.perl
files.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 .gitattributes | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitattributes b/.gitattributes
index aa08dd219d..1bdc91e282 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -4,6 +4,7 @@
 *.perl eol=lf diff=perl
 *.pl eof=lf diff=perl
 *.pm eol=lf diff=perl
+*.py eol=lf diff=python
 /Documentation/git-*.txt eol=lf
 /command-list.txt eol=lf
 /GIT-VERSION-GEN eol=lf
-- 
2.17.0.290.gded63e768a


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

* Re: [PATCH 0/3] enable userdiff for more things in git.git
  2018-04-26  7:50 [PATCH 0/3] enable userdiff for more things in git.git Ævar Arnfjörð Bjarmason
                   ` (2 preceding siblings ...)
  2018-04-26  7:50 ` [PATCH 3/3] .gitattributes: add a diff driver for Python Ævar Arnfjörð Bjarmason
@ 2018-04-26  9:43 ` Junio C Hamano
  3 siblings, 0 replies; 5+ messages in thread
From: Junio C Hamano @ 2018-04-26  9:43 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason; +Cc: git

Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:

> A noticed that git.git doesn't have userdiff enabled for perl files,
> and looking over some recent patches this gave better results, while
> I'm at it add one for Python too. I couldn't find anything in
> gitattributes(5) that was worth the bother of enabling this (e.g. we
> just have one Ruby file).
>
> Ævar Arnfjörð Bjarmason (3):
>   .gitattributes: add *.pl extension for Perl
>   .gitattributes: use the "perl" differ for Perl
>   .gitattributes: add a diff driver for Python

All looked sane, except one minor "Huh?" in the titles.

The last one in the above list makes it look as if you are adding
the func header pattern and/or textconv filter for Python source
code, but the patch actually just specifies that .py is to be
processed by the existing diff driver meant for Python, and at least
to me, the wording for the second one reflects that better.


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

end of thread, other threads:[~2018-04-26  9:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-26  7:50 [PATCH 0/3] enable userdiff for more things in git.git Ævar Arnfjörð Bjarmason
2018-04-26  7:50 ` [PATCH 1/3] .gitattributes: add *.pl extension for Perl Ævar Arnfjörð Bjarmason
2018-04-26  7:50 ` [PATCH 2/3] .gitattributes: use the "perl" differ " Ævar Arnfjörð Bjarmason
2018-04-26  7:50 ` [PATCH 3/3] .gitattributes: add a diff driver for Python Ævar Arnfjörð Bjarmason
2018-04-26  9:43 ` [PATCH 0/3] enable userdiff for more things in git.git Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).