Skip to content

Commit c882c01

Browse files
up_the_ironsgitster
authored andcommitted
Clarified gitattributes documentation regarding custom hunk header.
The only part of the hunk header that we can change is the "TEXT" portion. Additionally, a few grammatical errors have been corrected. Signed-off-by: Garry Dolley <gdolley@ucla.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 61aeeef commit c882c01

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Documentation/gitattributes.txt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -270,27 +270,27 @@ See linkgit:git[1] for details.
270270
Defining a custom hunk-header
271271
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
272272

273-
Each group of changes (called "hunk") in the textual diff output
273+
Each group of changes (called a "hunk") in the textual diff output
274274
is prefixed with a line of the form:
275275

276276
@@ -k,l +n,m @@ TEXT
277277

278-
The text is called 'hunk header', and by default a line that
279-
begins with an alphabet, an underscore or a dollar sign is used,
280-
which matches what GNU 'diff -p' output uses. This default
281-
selection however is not suited for some contents, and you can
282-
use customized pattern to make a selection.
278+
This is called a 'hunk header'. The "TEXT" portion is by default a line
279+
that begins with an alphabet, an underscore or a dollar sign; this
280+
matches what GNU 'diff -p' output uses. This default selection however
281+
is not suited for some contents, and you can use a customized pattern
282+
to make a selection.
283283

284-
First in .gitattributes, you would assign the `diff` attribute
284+
First, in .gitattributes, you would assign the `diff` attribute
285285
for paths.
286286

287287
------------------------
288288
*.tex diff=tex
289289
------------------------
290290

291-
Then, you would define "diff.tex.funcname" configuration to
291+
Then, you would define a "diff.tex.funcname" configuration to
292292
specify a regular expression that matches a line that you would
293-
want to appear as the hunk header, like this:
293+
want to appear as the hunk header "TEXT", like this:
294294

295295
------------------------
296296
[diff "tex"]

0 commit comments

Comments
 (0)