[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
git format-patch on .texi (was: definition of NULL)
From: |
Eric Blake |
Subject: |
git format-patch on .texi (was: definition of NULL) |
Date: |
Thu, 13 Aug 2009 07:17:37 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.22) Gecko/20090605 Thunderbird/2.0.0.22 Mnenhy/0.7.6.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Bruno Haible on 8/13/2009 3:41 AM:
> I got some "malformed patch" errors while applying the patch. Due to wrapped
> lines such as
>
> @@ -12,6 +12,11 @@ The macros @code{EXIT_SUCCESS} and @code{EXIT_FAILURE}
> are
> not defined on
>
> Can you produce your patches without the diff -p option, or attach them
> rather than include them in the mail?
It might actually be better to introduce a custom diff attribute for .texi
files, that gives better 'git diff' and 'git format-patch' listings (m4
actually already does this during its ./bootstrap script). Using this in
your .git/config (or ~/.gitconfig):
address@hidden ][ ]*\([^,][^,]*\)
plus this in .gitattributes (or .git/info/attributes):
*.texi* diff=texinfo
the hunk header context looks a lot nicer.
I can't configure the former for everybody, but can at least do the
latter; any objections to this patch?
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkqEEnAACgkQ84KuGfSFAYC/2QCfeR98XAFZKNaFUCls1Bhb44lF
a84AoLb1Bo6udDIFdEnNBShZRDRY7Gxs
=/yWp
-----END PGP SIGNATURE-----
>From f85240dc6268ef6fa4305c0d6a0664786258b207 Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Thu, 13 Aug 2009 07:15:28 -0600
Subject: [PATCH] Improve git diff of texinfo files.
* .gitattributes: Add rule for *.texi files, with hint on how to
use it.
Copied from m4, and based on a report by Bruno Haible.
Signed-off-by: Eric Blake <address@hidden>
---
.gitattributes | 5 +++++
ChangeLog | 5 +++++
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/.gitattributes b/.gitattributes
index ca4ea27..e1e70e0 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1 +1,6 @@
+# See lib/git-merge-changelog for making this useful.
ChangeLog merge=merge-changelog
+
+# Run this to make 'git diff' of texinfo files list nicer context:
+# git config diff.texinfo.funcname 'address@hidden ][
]*\\([^,][^,]*\\)'
+*.texi* diff=texinfo
diff --git a/ChangeLog b/ChangeLog
index 97d438f..8e1f715 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2009-08-13 Eric Blake <address@hidden>
+ Improve git diff of texinfo files.
+ * .gitattributes: Add rule for *.texi files, with hint on how to
+ use it.
+ Copied from m4, and based on a report by Bruno Haible.
+
Fix NetBSD 5.0 NULL bug, rather than working around it.
* tests/test-locale.c: Revert previous patch.
* tests/test-stdio.c: Likewise.
--
1.6.3.3.334.g916e1