<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/diff-lib.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-11-25T23:24:53Z</updated>
<entry>
<title>Merge branch 'rs/plug-diff-cache-leak'</title>
<updated>2020-11-25T23:24:53Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-11-25T23:24:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ca065523c617fad68a4d85a971bbbe69125d93c1'/>
<id>urn:sha1:ca065523c617fad68a4d85a971bbbe69125d93c1</id>
<content type='text'>
Memleak fix.

* rs/plug-diff-cache-leak:
  diff-lib: plug minor memory leaks in do_diff_cache()
</content>
</entry>
<entry>
<title>diff-lib: plug minor memory leaks in do_diff_cache()</title>
<updated>2020-11-16T21:45:42Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2020-11-14T18:37:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d44e5267eaefb27521e4ed2655358b0282add239'/>
<id>urn:sha1:d44e5267eaefb27521e4ed2655358b0282add239</id>
<content type='text'>
do_diff_cache() builds a struct rev_info to hand to diff_cache() from
scratch by initializing it using repo_init_revisions() and then
replacing its diffopt and prune_data members.

The diffopt member is initialized to a heap-allocated list of options,
though.  Release it using diff_setup_done() before overwriting it.

The initial value of the prune_data member doesn't need to be released,
but the copy created using copy_pathspec() does.  Clear it after use.

Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'nk/diff-files-vs-fsmonitor'</title>
<updated>2020-11-09T22:06:25Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-11-09T22:06:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bf69da56c9e8adac1eee91b7a8b000363156c583'/>
<id>urn:sha1:bf69da56c9e8adac1eee91b7a8b000363156c583</id>
<content type='text'>
"git diff" and other commands that share the same machinery to
compare with working tree files have been taught to take advantage
of the fsmonitor data when available.

* nk/diff-files-vs-fsmonitor:
  p7519-fsmonitor: add a git add benchmark
  p7519-fsmonitor: refactor to avoid code duplication
  perf lint: add make test-lint to perf tests
  t/perf: add fsmonitor perf test for git diff
  t/perf/p7519-fsmonitor.sh: warm cache on first git status
  t/perf/README: elaborate on output format
  fsmonitor: use fsmonitor data in `git diff`
</content>
</entry>
<entry>
<title>Merge branch 'dl/diff-merge-base'</title>
<updated>2020-11-02T21:17:39Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-11-02T21:17:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b6fb70c985a6fc113e971a6696f328abf8315dce'/>
<id>urn:sha1:b6fb70c985a6fc113e971a6696f328abf8315dce</id>
<content type='text'>
"git diff A...B" learned "git diff --merge-base A B", which is a
longer short-hand to say the same thing.

* dl/diff-merge-base:
  contrib/completion: complete `git diff --merge-base`
  builtin/diff-tree: learn --merge-base
  builtin/diff-index: learn --merge-base
  t4068: add --merge-base tests
  diff-lib: define diff_get_merge_base()
  diff-lib: accept option flags in run_diff_index()
  contrib/completion: extract common diff/difftool options
  git-diff.txt: backtick quote command text
  git-diff-index.txt: make --cached description a proper sentence
  t4068: remove unnecessary &gt;tmp
</content>
</entry>
<entry>
<title>fsmonitor: use fsmonitor data in `git diff`</title>
<updated>2020-10-20T19:52:21Z</updated>
<author>
<name>Alex Vandiver</name>
<email>alexmv@dropbox.com</email>
</author>
<published>2020-10-20T13:40:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c9052a8392878d9e38381db5d2172f7f8f7272a3'/>
<id>urn:sha1:c9052a8392878d9e38381db5d2172f7f8f7272a3</id>
<content type='text'>
With fsmonitor enabled, the first call to match_stat_with_submodule
calls refresh_fsmonitor, incurring the overhead of reading the list of
updated files -- but run_diff_files does not respect the
CE_FSMONITOR_VALID flag.

Make use of the fsmonitor extension to skip lstat() calls on files
that fsmonitor judged as unmodified.

Notably, this change improves performance of the git shell prompt when
GIT_PS1_SHOWDIRTYSTATE is set.

Signed-off-by: Alex Vandiver &lt;alexmv@dropbox.com&gt;
Signed-off-by: Nipunn Koorapati &lt;nipunn@dropbox.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'so/combine-diff-simplify'</title>
<updated>2020-10-05T21:01:51Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-10-05T21:01:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=34415c76c8f67c8692090ef4911d1626689e8f38'/>
<id>urn:sha1:34415c76c8f67c8692090ef4911d1626689e8f38</id>
<content type='text'>
Code simplification.

* so/combine-diff-simplify:
  diff: get rid of redundant 'dense' argument
</content>
</entry>
<entry>
<title>diff: get rid of redundant 'dense' argument</title>
<updated>2020-09-29T18:54:53Z</updated>
<author>
<name>Sergey Organov</name>
<email>sorganov@gmail.com</email>
</author>
<published>2020-09-29T11:31:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d01141de5ab02cf4a156183ef4dc5ee8bf2638a3'/>
<id>urn:sha1:d01141de5ab02cf4a156183ef4dc5ee8bf2638a3</id>
<content type='text'>
Get rid of 'dense' argument that is redundant for every function that has
'struct rev_info *rev' argument as well, as the value of 'dense' passed is
always taken from 'rev-&gt;dense_combined_merges' field.

The only place where this was not the case is in 'submodule.c' where
'diff_tree_combined_merge()' was called with '1' for 'dense' argument. However,
at that call the 'revs' instance used is local to the function, and we now just
set 'revs-&gt;dense_combined_merges' to 1 in this local instance.

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>Merge branch 'es/format-patch-interdiff-cleanup'</title>
<updated>2020-09-22T19:36:28Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-09-22T19:36:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=634e0084fac75cf85449a813da14968c9663a094'/>
<id>urn:sha1:634e0084fac75cf85449a813da14968c9663a094</id>
<content type='text'>
"format-patch --range-diff=&lt;prev&gt; &lt;origin&gt;..HEAD" has been taught
not to ignore &lt;origin&gt; when &lt;prev&gt; is a single version.

* es/format-patch-interdiff-cleanup:
  format-patch: use 'origin' as start of current-series-range when known
  diff-lib: tighten show_interdiff()'s interface
  diff: move show_interdiff() from its own file to diff-lib
</content>
</entry>
<entry>
<title>builtin/diff-index: learn --merge-base</title>
<updated>2020-09-21T04:30:26Z</updated>
<author>
<name>Denton Liu</name>
<email>liu.denton@gmail.com</email>
</author>
<published>2020-09-20T11:22:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0f5a1d449b9538c2765de9d6683abbb83a7fb4e2'/>
<id>urn:sha1:0f5a1d449b9538c2765de9d6683abbb83a7fb4e2</id>
<content type='text'>
There is currently no easy way to take the diff between the working tree
or index and the merge base between an arbitrary commit and HEAD. Even
diff's `...` notation doesn't allow this because it only works between
commits. However, the ability to do this would be desirable to a user
who would like to see all the changes they've made on a branch plus
uncommitted changes without taking into account changes made in the
upstream branch.

Teach diff-index and diff (with one commit) the --merge-base option
which allows a user to use the merge base of a commit and HEAD as the
"before" side.

Signed-off-by: Denton Liu &lt;liu.denton@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>diff-lib: define diff_get_merge_base()</title>
<updated>2020-09-21T04:30:26Z</updated>
<author>
<name>Denton Liu</name>
<email>liu.denton@gmail.com</email>
</author>
<published>2020-09-20T11:22:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=177a8302683da62a62b5b03e8192fcfa897db750'/>
<id>urn:sha1:177a8302683da62a62b5b03e8192fcfa897db750</id>
<content type='text'>
In a future commit, we will be using this function to implement
--merge-base functionality in various diff commands.

Signed-off-by: Denton Liu &lt;liu.denton@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
