<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/Documentation/gitattributes.txt, branch v2.41.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.41.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.41.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2023-05-03T16:02:11Z</updated>
<entry>
<title>docs: rewrite the documentation of the text and eol attributes</title>
<updated>2023-05-03T16:02:11Z</updated>
<author>
<name>Alex Henrie</name>
<email>alexhenrie24@gmail.com</email>
</author>
<published>2023-05-03T04:46:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6696077aced3847b49af2db8b7477b6823fa681b'/>
<id>urn:sha1:6696077aced3847b49af2db8b7477b6823fa681b</id>
<content type='text'>
These two sentences are confusing because the description of the text
attribute sounds exactly the same as the description of the text=auto
attribute:

"Setting the text attribute on a path enables end-of-line normalization"

"When text is set to "auto", the path is marked for automatic
end-of-line conversion"

Unless the reader is already familiar with the two variants, there's a
high probability that they will think that "end-of-line normalization"
is the same thing as "automatic end-of-line conversion".

It's also not clear that the phrase "When the file has been committed
with CRLF, no conversion is done" in the paragraph for text=auto does
not apply equally to the bare text attribute which is described earlier.
Moreover, it falsely implies that normalization is only suppressed if
the file has been committed. In fact, running `git add` on a CRLF file,
adding the text=auto attribute to the file, and running `git add` again
does not do anything to the line endings either.

On top of that, in several places the documentation for the eol
attribute sounds like either it does not affect normalization on checkin
or it forces normalization on checkin. It also sounds like setting eol
(or setting a config variable) is required to turn on conversion on
checkout, but the text attribute can turn on conversion on checkout by
itself if eol is unspecified.

Rephrase the documentation of text, text=auto, eol, eol=crlf, and eol=lf
to be clear about how they are the same, how they are different, and in
what cases conversion is performed.

Helped-by: Torsten Bögershausen &lt;tboegi@web.de&gt;
Signed-off-by: Alex Henrie &lt;alexhenrie24@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jc/diff-algo-attribute'</title>
<updated>2023-02-27T18:08:56Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2023-02-27T18:08:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ece8dc97ae53d08247aa283b6f299e3e5b2669db'/>
<id>urn:sha1:ece8dc97ae53d08247aa283b6f299e3e5b2669db</id>
<content type='text'>
The "diff" drivers specified by the "diff" attribute attached to
paths can now specify which algorithm (e.g. histogram) to use.

* jc/diff-algo-attribute:
  diff: teach diff to read algorithm from diff driver
  diff: consolidate diff algorithm option parsing
</content>
</entry>
<entry>
<title>diff: teach diff to read algorithm from diff driver</title>
<updated>2023-02-21T17:29:10Z</updated>
<author>
<name>John Cai</name>
<email>johncai86@gmail.com</email>
</author>
<published>2023-02-20T21:04:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a4cf900ee734ce9bb73d57c5dfbb1da4a5a88bd3'/>
<id>urn:sha1:a4cf900ee734ce9bb73d57c5dfbb1da4a5a88bd3</id>
<content type='text'>
It can be useful to specify diff algorithms per file type. For example,
one may want to use the minimal diff algorithm for .json files, another
for .c files, etc.

The diff machinery already checks attributes for a diff driver. Teach
the diff driver parser a new type "algorithm" to look for in the
config, which will be used if a driver has been specified through the
attributes.

Enforce precedence of the diff algorithm by favoring the command line
option, then looking at the driver attributes &amp; config combination, then
finally the diff.algorithm config.

To enforce precedence order, use a new `ignore_driver_algorithm` member
during options parsing to indicate the diff algorithm was set via command
line args.

Signed-off-by: John Cai &lt;johncai86@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ar/typofix-gitattributes-doc'</title>
<updated>2023-01-05T06:07:21Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2023-01-05T06:07:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=09bfb2ed8151c4b34adb73480a679110bedae004'/>
<id>urn:sha1:09bfb2ed8151c4b34adb73480a679110bedae004</id>
<content type='text'>
Typofix.

* ar/typofix-gitattributes-doc:
  gitattributes.txt: fix typo in "comma separated"
</content>
</entry>
<entry>
<title>gitattributes.txt: fix typo in "comma separated"</title>
<updated>2022-12-27T23:29:29Z</updated>
<author>
<name>Andrei Rybak</name>
<email>rybak.a.v@gmail.com</email>
</author>
<published>2022-12-27T21:01:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f95526419bacf116abae549e5716f4ced1f38442'/>
<id>urn:sha1:f95526419bacf116abae549e5716f4ced1f38442</id>
<content type='text'>
Signed-off-by: Andrei Rybak &lt;rybak.a.v@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>userdiff: add builtin diff driver for kotlin language.</title>
<updated>2022-03-13T02:15:47Z</updated>
<author>
<name>Jaydeep P Das</name>
<email>jaydeepjd.8914@gmail.com</email>
</author>
<published>2022-03-12T04:48:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=09188ed930bcb08e56d1846fbf9f5cb972a2d188'/>
<id>urn:sha1:09188ed930bcb08e56d1846fbf9f5cb972a2d188</id>
<content type='text'>
The xfuncname pattern finds func/class declarations
in diffs to display as a hunk header. The word_regex
pattern finds individual tokens in Kotlin code to generate
appropriate diffs.

This patch adds xfuncname regex and word_regex for Kotlin
language.

Signed-off-by: Jaydeep P Das &lt;jaydeepjd.8914@gmail.com&gt;
Acked-by: Johannes Sixt &lt;j6t@kdbg.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>doc: clarify interaction between 'eol' and text=auto</title>
<updated>2022-02-14T21:01:25Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2022-02-14T18:15:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6a5678f2576dba579e35c6d86b02584abee0ac37'/>
<id>urn:sha1:6a5678f2576dba579e35c6d86b02584abee0ac37</id>
<content type='text'>
The `eol` takes effect on text files only when the index has the
contents in LF line endings.  Paths with contents in CRLF line
endings in the index may become dirty unless text=auto.

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>docs: correct documentation about eol attribute</title>
<updated>2022-01-12T18:22:22Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2022-01-11T02:15:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8c591dbfcef9b4d40cfae7f675a2c99a0e925157'/>
<id>urn:sha1:8c591dbfcef9b4d40cfae7f675a2c99a0e925157</id>
<content type='text'>
The documentation for the eol attribute states that it is "effectively
setting the text attribute".  However, this implies that it forces the
text attribute to always be set, which has not been the case since
6523728499 ("convert: unify the "auto" handling of CRLF", 2016-06-28).
Let's avoid confusing users (and the present author when trying to
describe Git's behavior to others) by clearly documenting in which
cases the "eol" attribute has effect.

Specifically, the attribute always has an effect unless the file is
explicitly set as -text, or the file is set as text=auto and the file is
detected as binary.

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>docs: document symlink restrictions for dot-files</title>
<updated>2021-05-04T02:52:03Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2021-05-03T20:43:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8ff06de10c12ef1f796fcefb96166133965d510e'/>
<id>urn:sha1:8ff06de10c12ef1f796fcefb96166133965d510e</id>
<content type='text'>
We stopped allowing symlinks for .gitmodules files in 10ecfa7649
(verify_path: disallow symlinks in .gitmodules, 2018-05-04), and we
stopped following symlinks for .gitattributes, .gitignore, and .mailmap
in the commits from 204333b015 (Merge branch 'jk/open-dotgitx-with-nofollow',
2021-03-22). The reasons are discussed in detail there, but we never
adjusted the documentation to let users know.

This hasn't been a big deal since the point is that such setups were
mildly broken and thought to be unusual anyway. But it certainly doesn't
hurt to be clear and explicit about it.

Suggested-by: Philip Oakley &lt;philipoakley@iee.email&gt;
Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>userdiff: add support for Scheme</title>
<updated>2021-04-08T20:56:09Z</updated>
<author>
<name>Atharva Raykar</name>
<email>raykar.ath@gmail.com</email>
</author>
<published>2021-04-08T09:14:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a43739031092f951674d783ad3bdcbd603281851'/>
<id>urn:sha1:a43739031092f951674d783ad3bdcbd603281851</id>
<content type='text'>
Add a diff driver for Scheme-like languages which recognizes top level
and local `define` forms, whether it is a function definition, binding,
syntax definition or a user-defined `define-xyzzy` form.

Also supports R6RS `library` forms, `module` forms along with class and
struct declarations used in Racket (PLT Scheme).

Alternate "def" syntax such as those in Gerbil Scheme are also
supported, like defstruct, defsyntax and so on.

The rationale for picking `define` forms for the hunk headers is because
it is usually the only significant form for defining the structure of
the program, and it is a common pattern for schemers to have local
function definitions to hide their visibility, so it is not only the top
level `define`'s that are of interest. Schemers also extend the language
with macros to provide their own define forms (for example, something
like a `define-test-suite`) which is also captured in the hunk header.

Since it is common practice to extend syntax with variants of a form
like `module+`, `class*` etc, those have been supported as well.

The word regex is a best-effort attempt to conform to R7RS[1] valid
identifiers, symbols and numbers.

[1] https://small.r7rs.org/attachment/r7rs.pdf (section 2.1)

Signed-off-by: Atharva Raykar &lt;raykar.ath@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
