From: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
To: <git@vger.kernel.org>
Cc: Junio C Hamano <gitster@pobox.com>,
Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Subject: [PATCH 1bis/2] Diff patterns for POSIX shells
Date: Wed, 3 Aug 2011 07:26:16 +0200 [thread overview]
Message-ID: <1312349176-20984-1-git-send-email-giuseppe.bilotta@gmail.com> (raw)
In-Reply-To: <7vzkjrem6b.fsf@alter.siamese.dyndns.org>
All diffs following a function definition will have that function name
as chunck header, but this is the best we can do with the current
userdiff capabilities.
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
---
userdiff.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/userdiff.c b/userdiff.c
index 01d3a8b..94b1c47 100644
--- a/userdiff.c
+++ b/userdiff.c
@@ -107,6 +107,9 @@
"(@|@@|\\$)?[a-zA-Z_][a-zA-Z0-9_]*"
"|[-+0-9.e]+|0[xXbB]?[0-9a-fA-F]+|\\?(\\\\C-)?(\\\\M-)?."
"|//=?|[-+*/<>%&^|=!]=|<<=?|>>=?|===|\\.{1,3}|::|[!=]~"),
+PATTERNS("shell", "^[ \t]*([a-zA-Z_0-9]+)[ \t]*\\(\\).*",
+ /* -- */
+ "\\$?[a-zA-Z_0-9]+|&&|\\|\\|"),
PATTERNS("bibtex", "(@[a-zA-Z]{1,}[ \t]*\\{{0,1}[ \t]*[^ \t\"@',\\#}{~%]*).*$",
"[={}\"]|[^={}\" \t]+"),
PATTERNS("tex", "^(\\\\((sub)*section|chapter|part)\\*{0,1}\\{.*)$",
--
1.7.6.485.gd947c.dirty
next prev parent reply other threads:[~2011-08-03 5:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-01 10:37 [PATCH 0/2] Minor userdiff stuff Giuseppe Bilotta
2011-08-01 10:37 ` [PATCH 1/2] Diff patterns for POSIX shells Giuseppe Bilotta
2011-08-02 17:51 ` Junio C Hamano
2011-08-02 18:52 ` Giuseppe Bilotta
2011-08-03 5:26 ` Giuseppe Bilotta [this message]
2011-08-03 9:32 ` [PATCH 1bis/2] " Jeff King
2011-08-03 10:12 ` Giuseppe Bilotta
2011-08-03 18:53 ` Junio C Hamano
2011-08-01 10:37 ` [PATCH 2/2] Use specific diff rules for repo files Giuseppe Bilotta
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1312349176-20984-1-git-send-email-giuseppe.bilotta@gmail.com \
--to=giuseppe.bilotta@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 NNTP newsgroup(s).