<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/git.git/diff-lib.c, branch v1.7.9.3</title>
<subtitle>Git
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.7.9.3</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.7.9.3'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/'/>
<updated>2012-01-16T22:17:18Z</updated>
<entry>
<title>diff-index: enable recursive pathspec matching in unpack_trees</title>
<updated>2012-01-16T22:17:18Z</updated>
<author>
<name>Nguyen Thai Ngoc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2012-01-15T10:03:27Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=4838237cb73a13d38a7e4348b71be96b60eed21e'/>
<id>urn:sha1:4838237cb73a13d38a7e4348b71be96b60eed21e</id>
<content type='text'>
The pathspec structure has a few bits of data to drive various operation
modes after we unified the pathspec matching logic in various codepaths.
For example, max_depth field is there so that "git grep" can limit the
output for files found in limited depth of tree traversal. Also in order
to show just the surface level differences in "git diff-tree", recursive
field stops us from descending into deeper level of the tree structure
when it is set to false, and this also affects pathspec matching when
we have wildcards in the pathspec.

The diff-index has always wanted the recursive behaviour, and wanted to
match pathspecs without any depth limit. But we forgot to do so when we
updated tree_entry_interesting() logic to unify the pathspec matching
logic.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'cn/eradicate-working-copy'</title>
<updated>2011-10-05T19:36:26Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-10-05T19:36:26Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=9a33b691aaaae995b2da65a08d927c31106c8a3d'/>
<id>urn:sha1:9a33b691aaaae995b2da65a08d927c31106c8a3d</id>
<content type='text'>
* cn/eradicate-working-copy:
  Remove 'working copy' from the documentation and C code
</content>
</entry>
<entry>
<title>Merge branch 'jc/diff-index-unpack'</title>
<updated>2011-10-05T19:35:53Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-10-05T19:35:53Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=1b840a56629c8c0620c261672cc5d4d35ba253fa'/>
<id>urn:sha1:1b840a56629c8c0620c261672cc5d4d35ba253fa</id>
<content type='text'>
* jc/diff-index-unpack:
  diff-index: pass pathspec down to unpack-trees machinery
  unpack-trees: allow pruning with pathspec
  traverse_trees(): allow pruning with pathspec
</content>
</entry>
<entry>
<title>Remove 'working copy' from the documentation and C code</title>
<updated>2011-09-21T21:26:38Z</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@elego.de</email>
</author>
<published>2011-09-20T20:25:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=f7d650c06ea3242cbf0e6ae2820d5b839ab97cd5'/>
<id>urn:sha1:f7d650c06ea3242cbf0e6ae2820d5b839ab97cd5</id>
<content type='text'>
The git term is 'working tree', so replace the most public references
to 'working copy'.

Signed-off-by: Carlos Martín Nieto &lt;cmn@elego.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>diff-index: pass pathspec down to unpack-trees machinery</title>
<updated>2011-08-29T22:09:17Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-08-29T20:34:08Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=2f88c19700feb8db8f116f94bf558e61c82d543c'/>
<id>urn:sha1:2f88c19700feb8db8f116f94bf558e61c82d543c</id>
<content type='text'>
And finally, pass the pathspec down through unpack_trees() to traverse_trees()
callchain.

Before and after applying this series, looking for changes in the kernel
repository with a fairly narrow pathspec becomes somewhat faster.

  (without patch)
  $ /usr/bin/time git diff --raw v2.6.27 -- net/ipv6 &gt;/dev/null
  0.48user 0.05system 0:00.53elapsed 100%CPU (0avgtext+0avgdata 163296maxresident)k
  0inputs+952outputs (0major+11163minor)pagefaults 0swaps

  (with patch)
  $ /usr/bin/time git diff --raw v2.6.27 -- net/ipv6 &gt;/dev/null
  0.01user 0.00system 0:00.02elapsed 104%CPU (0avgtext+0avgdata 43856maxresident)k
  0inputs+24outputs (0major+3688minor)pagefaults 0swaps

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jc/diff-index-refactor'</title>
<updated>2011-08-08T19:33:33Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-08-08T19:33:33Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=54945edbbf0f0d1cc0b37e5095228d6b2ba2050f'/>
<id>urn:sha1:54945edbbf0f0d1cc0b37e5095228d6b2ba2050f</id>
<content type='text'>
* jc/diff-index-refactor:
  diff-lib: refactor run_diff_index() and do_diff_cache()
  diff-lib: simplify do_diff_cache()
</content>
</entry>
<entry>
<title>Merge branch 'jc/maint-reset-unmerged-path'</title>
<updated>2011-08-01T22:00:08Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-08-01T22:00:08Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=1df561fb4861708ce208488aa307516c0ecfa968'/>
<id>urn:sha1:1df561fb4861708ce208488aa307516c0ecfa968</id>
<content type='text'>
* jc/maint-reset-unmerged-path:
  reset [&lt;commit&gt;] paths...: do not mishandle unmerged paths
</content>
</entry>
<entry>
<title>diff-lib: refactor run_diff_index() and do_diff_cache()</title>
<updated>2011-07-14T04:58:21Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-07-14T01:57:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=bf979c07c728b9d4f2691a023b3f358610808789'/>
<id>urn:sha1:bf979c07c728b9d4f2691a023b3f358610808789</id>
<content type='text'>
The latter is meant to be an API for internal callers that want to inspect
the resulting diff-queue, while the former is an implementation of "git
diff-index" command. Extract the common logic into a single helper
function and make them thin wrappers around it.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>diff-lib: simplify do_diff_cache()</title>
<updated>2011-07-14T04:58:15Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-07-14T01:42:32Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=fe549c21fc3d99b9ff66f03d192f955400c80191'/>
<id>urn:sha1:fe549c21fc3d99b9ff66f03d192f955400c80191</id>
<content type='text'>
Since 34110cd (Make 'unpack_trees()' have a separate source and
destination index, 2008-03-06), we can run unpack_trees() without munging
the index at all, but do_diff_cache() tried ever so carefully to work
around the old behaviour of the function.

We can just tell unpack_trees() not to touch the original index and there
is no need to clean-up whatever the previous round has done.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>reset [&lt;commit&gt;] paths...: do not mishandle unmerged paths</title>
<updated>2011-07-14T04:39:18Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-07-14T04:36:29Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=ff00b682f203eb39876b57404916b4c54b6032c6'/>
<id>urn:sha1:ff00b682f203eb39876b57404916b4c54b6032c6</id>
<content type='text'>
Because "diff --cached HEAD" showed an incorrect blob object name on the
LHS of the diff, we ended up updating the index entry with bogus value,
not what we read from the tree.

Noticed by John Nowak.

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