<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/diff.c, 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-12-18T23:15:18Z</updated>
<entry>
<title>Merge branch 'jc/diff-I-status-fix'</title>
<updated>2020-12-18T23:15:18Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-12-18T23:15:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=59fcf746f5a6253b3c0a84a94ecd5cf1add56e3a'/>
<id>urn:sha1:59fcf746f5a6253b3c0a84a94ecd5cf1add56e3a</id>
<content type='text'>
"git diff -I&lt;pattern&gt; -exit-code" should exit with 0 status when
all the changes match the ignored pattern, but it didn't.

* jc/diff-I-status-fix:
  diff: correct interaction between --exit-code and -I&lt;pattern&gt;
</content>
</entry>
<entry>
<title>diff: correct interaction between --exit-code and -I&lt;pattern&gt;</title>
<updated>2020-12-17T01:33:26Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-12-17T01:27:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=50f04394908fe308a421b360951b1f73b00363ee'/>
<id>urn:sha1:50f04394908fe308a421b360951b1f73b00363ee</id>
<content type='text'>
Just like "git diff -w --exit-code" should exit with 0 when ignoring
whitespace differences results in no changes shown, if ignoring
certain changes with "git diff -I&lt;pattern&gt; --exit-code" result in an
empty patch, we should exit with 0.

The test suite did not cover the interaction between "--exit-code"
and "-w"; add one while adding a new test for "--exit-code" + "-I".

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'en/strmap'</title>
<updated>2020-11-21T23:14:38Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-11-21T23:14:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bf0a430f70b53f94454692c9ae8ddadd18891aaa'/>
<id>urn:sha1:bf0a430f70b53f94454692c9ae8ddadd18891aaa</id>
<content type='text'>
A specialization of hashmap that uses a string as key has been
introduced.  Hopefully it will see wider use over time.

* en/strmap:
  shortlog: use strset from strmap.h
  Use new HASHMAP_INIT macro to simplify hashmap initialization
  strmap: take advantage of FLEXPTR_ALLOC_STR when relevant
  strmap: enable allocations to come from a mem_pool
  strmap: add a strset sub-type
  strmap: split create_entry() out of strmap_put()
  strmap: add functions facilitating use as a string-&gt;int map
  strmap: enable faster clearing and reusing of strmaps
  strmap: add more utility functions
  strmap: new utility functions
  hashmap: provide deallocation function names
  hashmap: introduce a new hashmap_partial_clear()
  hashmap: allow re-use after hashmap_free()
  hashmap: adjust spacing to fix argument alignment
  hashmap: add usage documentation explaining hashmap_free[_entries]()
</content>
</entry>
<entry>
<title>Merge branch 'jk/diff-release-filespec-fix'</title>
<updated>2020-11-21T23:14:38Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-11-21T23:14:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d5e35329dd5305d611478e8d5076a8ca75e25f0d'/>
<id>urn:sha1:d5e35329dd5305d611478e8d5076a8ca75e25f0d</id>
<content type='text'>
Running "git diff" while allowing external diff in a state with
unmerged paths used to segfault, which has been corrected.

* jk/diff-release-filespec-fix:
  t7800: simplify difftool test
  diff: allow passing NULL to diff_free_filespec_data()
</content>
</entry>
<entry>
<title>diff: allow passing NULL to diff_free_filespec_data()</title>
<updated>2020-11-06T19:37:07Z</updated>
<author>
<name>Jinoh Kang</name>
<email>luke1337@theori.io</email>
</author>
<published>2020-11-06T17:14:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=246959346f3407cb047c3d46ed9c44da84bd0b29'/>
<id>urn:sha1:246959346f3407cb047c3d46ed9c44da84bd0b29</id>
<content type='text'>
Commit 3aef54e8b8 ("diff: munmap() file contents before running external
diff") introduced calls to diff_free_filespec_data in
run_external_diff, which may pass NULL pointers.

Fix this and prevent any such bugs in the future by making
`diff_free_filespec_data(NULL)` a no-op.

Fixes: 3aef54e8b8 ("diff: munmap() file contents before running external diff")
Signed-off-by: Jinoh Kang &lt;luke1337@theori.io&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>hashmap: provide deallocation function names</title>
<updated>2020-11-02T20:15:50Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2020-11-02T18:55:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6da1a258142ac2422c8c57c54b92eaed3c86226e'/>
<id>urn:sha1:6da1a258142ac2422c8c57c54b92eaed3c86226e</id>
<content type='text'>
hashmap_free(), hashmap_free_entries(), and hashmap_free_() have existed
for a while, but aren't necessarily the clearest names, especially with
hashmap_partial_clear() being added to the mix and lazy-initialization
now being supported.  Peff suggested we adopt the following names[1]:

  - hashmap_clear() - remove all entries and de-allocate any
    hashmap-specific data, but be ready for reuse

  - hashmap_clear_and_free() - ditto, but free the entries themselves

  - hashmap_partial_clear() - remove all entries but don't deallocate
    table

  - hashmap_partial_clear_and_free() - ditto, but free the entries

This patch provides the new names and converts all existing callers over
to the new naming scheme.

[1] https://lore.kernel.org/git/20201030125059.GA3277724@coredump.intra.peff.net/

Signed-off-by: Elijah Newren &lt;newren@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>diff: fix modified lines stats with --stat and --numstat</title>
<updated>2020-09-24T19:31:45Z</updated>
<author>
<name>Thomas Guyot-Sionnest</name>
<email>tguyot@gmail.com</email>
</author>
<published>2020-09-24T07:41:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ff0c7fa8cbd7f7d5e81c2501222b60f0aac30bb9'/>
<id>urn:sha1:ff0c7fa8cbd7f7d5e81c2501222b60f0aac30bb9</id>
<content type='text'>
Only skip diffstats when both oids are valid and identical. This check
was causing both false-positives (files included in diffstats with no
actual changes (0 lines modified) and false-negatives (showing 0 lines
modified in stats when files had actually changed).

Also replaced same_contents with may_differ to avoid confusion.

Signed-off-by: Thomas Guyot-Sionnest &lt;tguyot@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jc/quote-path-cleanup'</title>
<updated>2020-09-19T00:58:04Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-09-19T00:58:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9d4e7ec4d9e695d95cc7474f59fba8cc38580e29'/>
<id>urn:sha1:9d4e7ec4d9e695d95cc7474f59fba8cc38580e29</id>
<content type='text'>
"git status --short" quoted a path with SP in it when tracked, but
not those that are untracked, ignored or unmerged.  They are all
shown quoted consistently.

* jc/quote-path-cleanup:
  quote: turn 'nodq' parameter into a set of flags
  quote: rename misnamed sq_lookup[] to cq_lookup[]
  wt-status: consistently quote paths in "status --short" output
  quote_path: code clarification
  quote_path: optionally allow quoting a path with SP in it
  quote_path: give flags parameter to quote_path()
  quote_path: rename quote_path_relative() to quote_path()
</content>
</entry>
</feed>
