Thread (2 messages) flat view 2 messages, 1 author, 2016-06-15
DORMANTno replies

[PATCH 1/2] gitattributes: Document built in hunk header patterns

From: Gustaf Hendeby <hidden>
Date: 2016-06-15 22:45:08
Subsystem: documentation, the rest · Maintainers: Jonathan Corbet, Linus Torvalds

Since the hunk header pattern text was written patterns for Ruby and
Pascal/Delphi have been added.  For users to be able to find them they
should be documented not only in code.

Signed-off-by: Gustaf Hendeby <redacted>
---

Would it maybe be a good idea to also link to this information in the
git diff documentation?  At the moment I can't find any documentation
about hunk headers and hunk header patterns at all in the diff
documentation.  The git diff documentation is the first place I would
look for that kind of information.  OTOH, the diff documentation is
already quite lengthy and I'm not really found of making it even
longer.  Oppinions how this nice feature should best be made generally
known?

/Gustaf

 Documentation/gitattributes.txt |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt
index d7b4114..c61a58d 100644
--- a/Documentation/gitattributes.txt
+++ b/Documentation/gitattributes.txt
@@ -307,9 +307,16 @@ backslash, and zero or more occurrences of `sub` followed by
 There are a few built-in patterns to make this easier, and `tex`
 is one of them, so you do not have to write the above in your
 configuration file (you still need to enable this with the
-attribute mechanism, via `.gitattributes`).  Another built-in
-pattern is defined for `java` that defines a pattern suitable
-for program text in Java language.
+attribute mechanism, via `.gitattributes`).  The following built in
+patterns are available:
+
+- `java` suitable for source code in the Java lanugage.
+
+- `pascal` suitable for source code in the Pascal/Delphi language.
+
+- `ruby` suitable for source code in the Ruby language.
+
+- `tex` suitable for source code for LaTeX documents.
 
 
 Performing a three-way merge
-- 
1.6.0.rc2.30.gf3f0.dirty
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help