<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/Documentation/diff-options.txt, branch v2.30.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.30.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.30.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2020-11-18T21:32:53Z</updated>
<entry>
<title>Merge branch 'pb/blame-funcname-range-userdiff'</title>
<updated>2020-11-18T21:32:53Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-11-18T21:32:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3f6dc9c36693c2ba6dd5fb61fbad6b72cc08e3d1'/>
<id>urn:sha1:3f6dc9c36693c2ba6dd5fb61fbad6b72cc08e3d1</id>
<content type='text'>
"git blame -L :funcname -- path" did not work well for a path for
which a userdiff driver is defined.

* pb/blame-funcname-range-userdiff:
  blame: simplify 'setup_blame_bloom_data' interface
  blame: simplify 'setup_scoreboard' interface
  blame: enable funcname blaming with userdiff driver
  line-log: mention both modes in 'blame' and 'log' short help
  doc: add more pointers to gitattributes(5) for userdiff
  blame-options.txt: also mention 'funcname' in '-L' description
  doc: line-range: improve formatting
  doc: log, gitk: move '-L' description to 'line-range-options.txt'
</content>
</entry>
<entry>
<title>Merge branch 'jc/abbrev-doc'</title>
<updated>2020-11-11T21:18:38Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-11-11T21:18:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ee13bebbd50f69ac593f3e87a0958045f38edf6d'/>
<id>urn:sha1:ee13bebbd50f69ac593f3e87a0958045f38edf6d</id>
<content type='text'>
The documentation on the "--abbrev=&lt;n&gt;" option did not say the
output may be longer than "&lt;n&gt;" hexdigits, which has been
clarified.

* jc/abbrev-doc:
  doc: clarify that --abbrev=&lt;n&gt; is about the minimum length
</content>
</entry>
<entry>
<title>Merge branch 'so/format-patch-doc-on-default-diff-format'</title>
<updated>2020-11-11T21:18:37Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-11-11T21:18:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c5a802f0ce46c34232cd85ae51d6f5d1cd5a574b'/>
<id>urn:sha1:c5a802f0ce46c34232cd85ae51d6f5d1cd5a574b</id>
<content type='text'>
Docfix.

* so/format-patch-doc-on-default-diff-format:
  doc/diff-options: fix out of place mentions of '--patch/-p'
</content>
</entry>
<entry>
<title>doc: clarify that --abbrev=&lt;n&gt; is about the minimum length</title>
<updated>2020-11-04T22:04:44Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-11-04T22:01:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cda34e0d0cc3e0b53e6c496c56e07e34c339263f'/>
<id>urn:sha1:cda34e0d0cc3e0b53e6c496c56e07e34c339263f</id>
<content type='text'>
Early text written in 2006 explains the "--abbrev=&lt;n&gt;" option to
"show only a partial prefix", without saying that the length of the
partial prefix is not necessarily the number given to the option to
ensure that the output names the object uniquely.

Update documentation for the diff family of commands, "blame",
"branch --verbose", "ls-files" and "ls-tree" to stress that the
short prefix must uniquely refer to an object, and &lt;n&gt; is merely
the mininum number of hexdigits used in the prefix.

Helped-by: Derrick Stolee &lt;dstolee@microsoft.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'mk/diff-ignore-regex'</title>
<updated>2020-11-02T21:17:44Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-11-02T21:17:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1ae0949a036864de1f5caa7b375b875284d1c69e'/>
<id>urn:sha1:1ae0949a036864de1f5caa7b375b875284d1c69e</id>
<content type='text'>
"git diff" family of commands learned the "-I&lt;regex&gt;" option to
ignore hunks whose changed lines all match the given pattern.

* mk/diff-ignore-regex:
  diff: add -I&lt;regex&gt; that ignores matching changes
  merge-base, xdiff: zero out xpparam_t structures
</content>
</entry>
<entry>
<title>doc: add more pointers to gitattributes(5) for userdiff</title>
<updated>2020-11-01T23:54:14Z</updated>
<author>
<name>Philippe Blain</name>
<email>levraiphilippeblain@gmail.com</email>
</author>
<published>2020-11-01T17:28:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0cce88f1e4b0ccbdc804db8b522aeb11b0f2b199'/>
<id>urn:sha1:0cce88f1e4b0ccbdc804db8b522aeb11b0f2b199</id>
<content type='text'>
Several Git commands can make use of the builtin userdiff patterns, but
it's not obvious in the documentation. Add pointers to the 'Defining a
custom hunk header' part of gitattributes(5) in the description of the
following options:

- the '--function-context' option of `git diff` and friends
- the '--function-context' option of `git grep`
- the '-L :&lt;funcname&gt;' option of `git log`, `gitk` and `git blame`

In 'git-grep.txt', take the opportunity to use backticks in the
description of '--show-function', and improve the wording of the
desription of '--function-context'.

Signed-off-by: Philippe Blain &lt;levraiphilippeblain@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>doc/diff-options: fix out of place mentions of '--patch/-p'</title>
<updated>2020-10-31T20:14:26Z</updated>
<author>
<name>Sergey Organov</name>
<email>sorganov@gmail.com</email>
</author>
<published>2020-10-31T19:37:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=714d491af0307782989bc3256d4aafa11d647729'/>
<id>urn:sha1:714d491af0307782989bc3256d4aafa11d647729</id>
<content type='text'>
First, references to --patch and -p appeared in the description of
git-format-patch, where the options themselves are not included.

Next, the description of --unified option elsewhere had duplicate implied
statements: "Implies --patch. Implies -p."

Signed-off-by: Sergey Organov &lt;sorganov@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>diff: add -I&lt;regex&gt; that ignores matching changes</title>
<updated>2020-10-20T19:53:26Z</updated>
<author>
<name>Michał Kępień</name>
<email>michal@isc.org</email>
</author>
<published>2020-10-20T06:48:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=296d4a94e7231a1d57356889f51bff57a1a3c5a1'/>
<id>urn:sha1:296d4a94e7231a1d57356889f51bff57a1a3c5a1</id>
<content type='text'>
Add a new diff option that enables ignoring changes whose all lines
(changed, removed, and added) match a given regular expression.  This is
similar to the -I/--ignore-matching-lines option in standalone diff
utilities and can be used e.g. to ignore changes which only affect code
comments or to look for unrelated changes in commits containing a large
number of automatically applied modifications (e.g. a tree-wide string
replacement).  The difference between -G/-S and the new -I option is
that the latter filters output on a per-change basis.

Use the 'ignore' field of xdchange_t for marking a change as ignored or
not.  Since the same field is used by --ignore-blank-lines, identical
hunk emitting rules apply for --ignore-blank-lines and -I.  These two
options can also be used together in the same git invocation (they are
complementary to each other).

Rename xdl_mark_ignorable() to xdl_mark_ignorable_lines(), to indicate
that it is logically a "sibling" of xdl_mark_ignorable_regex() rather
than its "parent".

Signed-off-by: Michał Kępień &lt;michal@isc.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'dd/diff-customize-index-line-abbrev'</title>
<updated>2020-08-31T22:49:46Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-08-31T22:49:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=096c948dabc7d13a6cc81a8ad803fd96fc1c5d15'/>
<id>urn:sha1:096c948dabc7d13a6cc81a8ad803fd96fc1c5d15</id>
<content type='text'>
The output from the "diff" family of the commands had abbreviated
object names of blobs involved in the patch, but its length was not
affected by the --abbrev option.  Now it is.

* dd/diff-customize-index-line-abbrev:
  diff: index-line: respect --abbrev in object's name
  t4013: improve diff-post-processor logic
</content>
</entry>
<entry>
<title>diff: index-line: respect --abbrev in object's name</title>
<updated>2020-08-21T19:43:05Z</updated>
<author>
<name>Đoàn Trần Công Danh</name>
<email>congdanhqx@gmail.com</email>
</author>
<published>2020-08-21T11:51:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3046c7f69a6337a971b219d047b8110e3f9ea971'/>
<id>urn:sha1:3046c7f69a6337a971b219d047b8110e3f9ea971</id>
<content type='text'>
A handful of Git's commands respect `--abbrev' for customizing length
of abbreviation of object names.

For diff-family, Git supports 2 different options for 2 different
purposes, `--full-index' for showing diff-patch object's name in full,
and `--abbrev' to customize the length of object names in diff-raw and
diff-tree header lines, without any options to customise the length of
object names in diff-patch format. When working with diff-patch format,
we only have two options, either full index, or default abbrev length.

Although, that behaviour is documented, it doesn't stop users from
trying to use `--abbrev' with the hope of customising diff-patch's
objects' name's abbreviation.

Let's allow the blob object names shown on the "index" line to be
abbreviated to arbitrary length given via the "--abbrev" option.

To preserve backward compatibility with old script that specify both
`--full-index' and `--abbrev', always show full object id
if `--full-index' is specified.

Signed-off-by: Đoàn Trần Công Danh &lt;congdanhqx@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
