<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/diff-lib.c, branch gitk-resize-error</title>
<subtitle>Fork of git SCM with my patches.</subtitle>
<id>http://git.kilabit.info/git/atom?h=gitk-resize-error</id>
<link rel='self' href='http://git.kilabit.info/git/atom?h=gitk-resize-error'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/'/>
<updated>2021-09-08T20:30:31Z</updated>
<entry>
<title>Merge branch 'dd/diff-files-unmerged-fix'</title>
<updated>2021-09-08T20:30:31Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-09-08T20:30:31Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=c8f491668e46d66290aec97caaf94fe2c1ecccbd'/>
<id>urn:sha1:c8f491668e46d66290aec97caaf94fe2c1ecccbd</id>
<content type='text'>
"git diff --relative" segfaulted and/or produced incorrect result
when there are unmerged paths.

* dd/diff-files-unmerged-fix:
  diff-lib: ignore paths that are outside $cwd if --relative asked
</content>
</entry>
<entry>
<title>diff-lib: ignore paths that are outside $cwd if --relative asked</title>
<updated>2021-08-25T18:49:36Z</updated>
<author>
<name>Đoàn Trần Công Danh</name>
<email>congdanhqx@gmail.com</email>
</author>
<published>2021-08-22T08:49:08Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=8174627b3d32dc80cb477b3fa46971955f26c6b2'/>
<id>urn:sha1:8174627b3d32dc80cb477b3fa46971955f26c6b2</id>
<content type='text'>
For diff family commands, we can tell them to exclude changes outside
of some directories if --relative is requested.

In diff_unmerge(), NULL will be returned if the requested path is
outside of the interesting directories, thus we'll run into NULL
pointer dereference in run_diff_files when trying to dereference
its return value.

Checking for return value of diff_unmerge before dereferencing
is not sufficient, though. Since, diff engine will try to work on such
pathspec later.

Let's not run diff on those unintesting entries, instead.
As a side effect, by skipping like that, we can save some CPU cycles.

Reported-by: Thomas De Zeeuw &lt;thomas@slight.dev&gt;
Tested-by: Carlo Arenas &lt;carenas@gmail.com&gt;
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>
<entry>
<title>diff-lib: handle index diffs with sparse dirs</title>
<updated>2021-07-14T20:42:49Z</updated>
<author>
<name>Derrick Stolee</name>
<email>dstolee@microsoft.com</email>
</author>
<published>2021-07-14T13:12:35Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=9eb00af5627f1a04ca083128085ca6774fce0524'/>
<id>urn:sha1:9eb00af5627f1a04ca083128085ca6774fce0524</id>
<content type='text'>
While comparing an index to a tree, we may see a sparse directory entry.
In this case, we should compare that portion of the tree to the tree
represented by that entry. This could include a new tree which needs to
be expanded to a full list of added files. It could also include an
existing tree, in which case all of the changes inside are important to
describe, including the modifications, additions, and deletions. Note
that the case where the tree has a path and the index does not remains
identical to before: the lack of a cache entry is the same with a sparse
index.

Use diff_tree_oid() appropriately to compute the diff.

Reviewed-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Derrick Stolee &lt;dstolee@microsoft.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>hash: provide per-algorithm null OIDs</title>
<updated>2021-04-27T07:31:39Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2021-04-26T01:02:56Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=14228447c9ce664a4e9c31ba10344ec5e4ea4ba5'/>
<id>urn:sha1:14228447c9ce664a4e9c31ba10344ec5e4ea4ba5</id>
<content type='text'>
Up until recently, object IDs did not have an algorithm member, only a
hash.  Consequently, it was possible to share one null (all-zeros)
object ID among all hash algorithms.  Now that we're going to be
handling objects from multiple hash algorithms, it's important to make
sure that all object IDs have a correct algorithm field.

Introduce a per-algorithm null OID, and add it to struct hash_algo.
Introduce a wrapper function as well, and use it everywhere we used to
use the null_oid constant.

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>fsmonitor: add assertion that fsmonitor is valid to check_removed</title>
<updated>2021-03-18T20:31:13Z</updated>
<author>
<name>Nipunn Koorapati</name>
<email>nipunn@dropbox.com</email>
</author>
<published>2021-03-17T21:22:22Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=0ec9949f78e348250f55ba0343344ec8c606be11'/>
<id>urn:sha1:0ec9949f78e348250f55ba0343344ec8c606be11</id>
<content type='text'>
Validate that fsmonitor is valid to futureproof against bugs where
check_removed might be called from places that haven't refreshed.

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>fsmonitor: skip lstat deletion check during git diff-index</title>
<updated>2021-03-18T20:31:11Z</updated>
<author>
<name>Nipunn Koorapati</name>
<email>nipunn@dropbox.com</email>
</author>
<published>2021-03-17T21:22:21Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=4f3d6d026176a48991c4e5ff95c8db583af38148'/>
<id>urn:sha1:4f3d6d026176a48991c4e5ff95c8db583af38148</id>
<content type='text'>
Teach git to honor fsmonitor rather than issuing an lstat
when checking for dirty local deletes. Eliminates O(files)
lstats during `git diff HEAD`

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 '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='http://git.kilabit.info/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='http://git.kilabit.info/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='http://git.kilabit.info/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='http://git.kilabit.info/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>
</feed>
