bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] * .gitattributes: Better diff output for texinfo sources.


From: Jim Meyering
Subject: Re: [PATCH] * .gitattributes: Better diff output for texinfo sources.
Date: Tue, 19 Aug 2008 09:40:46 +0200

Eric Blake <address@hidden> wrote:
> Jim Meyering <jim <at> meyering.net> writes:
>> FYI, git diff didn't produce the "funcname" style string
>> on each @@ line that I've come to expect in diffs of other
>> languages like C and ruby.  With this .gitattributes file
>> and following the advice in the comment, now it does:
>
> Thanks for the tip.
>
>> +*.texi diff=texinfo
>
> I would make thie *.texi* (making it easier to copy into projects that use 
> *.texinfo, like m4).

Good idea.

>> +# Put something like the following e.g., in your ~/.gitconfig file
>> +# # Include proper "function name" string in diffs of texinfo.
>> +# # Derived from the regexp in emacs' lisp/add-log.el.
>> +# [diff "texinfo"]
>> +#         funcname = "address@hidden \t]\\+\\([^,]\\+\\)"
>
> GNU specific.  For this to work on cygwin, I had to stick with POSIX BRE:
>
> funcname = "address@hidden \t][ \t]*\\([^,][^,]*\\)"

Another good idea.
Patch below:

> The m4 ./bootstrap script now goes so far as to try adding this setting (and 
> merge.gnu-merge-changelog.*) in .git/config as part of setting up the fresh 
> checkout; maybe you'd like to do the same in coreutils?

Sure, but since coreutils doesn't version-control ChangeLogs
(well, the ones that remain in VC won't be appended to)
any more, only the .gitattributes part would be useful.
Patch welcome.

>From f3574102d3fb8ce2057854bae6fb4dda786df9aa Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Tue, 19 Aug 2008 08:55:51 +0200
Subject: [PATCH] .gitattributes: generalize

* .gitattributes: Relax the glob pattern, so it matches *.texinfo, too.
Suggest a POSIX BRE, rather than one that uses the GNU extension, \\+.
---
 .gitattributes |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.gitattributes b/.gitattributes
index 6093269..32f18fd 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,7 +1,7 @@
-*.texi diff=texinfo
+*.texi* diff=texinfo

 # Put something like the following e.g., in your ~/.gitconfig file
 # # Include proper "function name" string in diffs of texinfo.
 # # Derived from the regexp in emacs' lisp/add-log.el.
 # [diff "texinfo"]
-#         funcname = "address@hidden \t]\\+\\([^,]\\+\\)"
+#         funcname = "address@hidden \t][ \t]*\\([^,][^,]*\\)"
--
1.6.0.4.g750768




reply via email to

[Prev in Thread] Current Thread [Next in Thread]