<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/tree.h, branch v2.4.9</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.4.9</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.4.9'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2015-06-25T18:02:10Z</updated>
<entry>
<title>Merge branch 'jk/squelch-missing-link-warning-for-unreachable' into maint</title>
<updated>2015-06-25T18:02:10Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-06-25T18:02:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c53312583b2d25b6ed5f0aa421993795743d1da6'/>
<id>urn:sha1:c53312583b2d25b6ed5f0aa421993795743d1da6</id>
<content type='text'>
Recent "git prune" traverses young unreachable objects to safekeep
old objects in the reachability chain from them, which sometimes
caused error messages that are unnecessarily alarming.

* jk/squelch-missing-link-warning-for-unreachable:
  suppress errors on missing UNINTERESTING links
  silence broken link warnings with revs-&gt;ignore_missing_links
  add quieter versions of parse_{tree,commit}
</content>
</entry>
<entry>
<title>add quieter versions of parse_{tree,commit}</title>
<updated>2015-06-01T16:29:42Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2015-06-01T09:56:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9cc2b07a7c95fad0bb5e3a7a8db29bebdb90d92b'/>
<id>urn:sha1:9cc2b07a7c95fad0bb5e3a7a8db29bebdb90d92b</id>
<content type='text'>
When we call parse_commit, it will complain to stderr if the
object does not exist or cannot be read. This means that we
may produce useless error messages if this situation is
expected (e.g., because the object is marked UNINTERESTING,
or because revs-&gt;ignore_missing_links is set).

We can fix this by adding a new "parse_X_gently" form that
takes a flag to suppress the messages. The existing
"parse_X" form is already gentle in the sense that it
returns an error rather than dying, and we could in theory
just add a "quiet" flag to it (with existing callers passing
"0"). But doing it this way means we do not have to disturb
existing callers.

Note also that the new flag is "quiet_on_missing", and not
just "quiet". We could add a flag to suppress _all_ errors,
but besides being a more invasive change (we would have to
pass the flag down to sub-functions, too), there is a good
reason not to: we would never want to use it. Missing a
linked object is expected in some circumstances, but it is
never expected to have a malformed commit, or to get a tree
when we wanted a commit.  We should always complain about
these corruptions.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>tree.c: update read_tree_recursive callback to pass strbuf as base</title>
<updated>2014-12-01T19:32:29Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2014-11-30T09:05:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6a0b0b6de996e2ac7eeb951e3d08f577c11c7e54'/>
<id>urn:sha1:6a0b0b6de996e2ac7eeb951e3d08f577c11c7e54</id>
<content type='text'>
This allows the callback to use 'base' as a temporary buffer to
quickly assemble full path "without" extra allocation. The callback
has to restore it afterwards of course.

Helped-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
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 'jk/free-tree-buffer'</title>
<updated>2013-09-17T18:37:33Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-09-17T18:37:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b8f23112f0415cc86eb0ec576ac7e16c7c9d78b8'/>
<id>urn:sha1:b8f23112f0415cc86eb0ec576ac7e16c7c9d78b8</id>
<content type='text'>
* jk/free-tree-buffer:
  clear parsed flag when we free tree buffers
</content>
</entry>
<entry>
<title>checkout: convert read_tree_some to take struct pathspec</title>
<updated>2013-07-15T17:56:08Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2013-07-14T08:35:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=18e4f4059936dd35dfe929f502101ca371af856c'/>
<id>urn:sha1:18e4f4059936dd35dfe929f502101ca371af856c</id>
<content type='text'>
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>clear parsed flag when we free tree buffers</title>
<updated>2013-06-06T17:29:12Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2013-06-05T22:37:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6e454b9a31840102807f1eee527ee717bf134102'/>
<id>urn:sha1:6e454b9a31840102807f1eee527ee717bf134102</id>
<content type='text'>
Many code paths will free a tree object's buffer and set it
to NULL after finishing with it in order to keep memory
usage down during a traversal. However, out of 8 sites that
do this, only one actually unsets the "parsed" flag back.
Those sites that don't are setting a trap for later users of
the tree object; even after calling parse_tree, the buffer
will remain NULL, causing potential segfaults.

It is not known whether this is triggerable in the current
code. Most commands do not do an in-memory traversal
followed by actually using the objects again. However, it
does not hurt to be safe for future callers.

In most cases, we can abstract this out to a
"free_tree_buffer" helper. However, there are two
exceptions:

  1. The fsck code relies on the parsed flag to know that we
     were able to parse the object at one point. We can
     switch this to using a flag in the "flags" field.

  2. The index-pack code sets the buffer to NULL but does
     not free it (it is freed by a caller). We should still
     unset the parsed flag here, but we cannot use our
     helper, as we do not want to free the buffer.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Convert read_tree{,_recursive} to support struct pathspec</title>
<updated>2011-03-25T16:20:33Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2011-03-25T09:34:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f0096c06bcdeb7aa6ae8a749ddc9d6d4a2c381d1'/>
<id>urn:sha1:f0096c06bcdeb7aa6ae8a749ddc9d6d4a2c381d1</id>
<content type='text'>
This patch changes behavior of the two functions. Previously it does
prefix matching only. Now it can also do wildcard matching.

All callers are updated. Some gain wildcard matching (archive,
checkout), others reset pathspec_item.has_wildcard to retain old
behavior (ls-files, ls-tree as they are plumbing).

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>add context pointer to read_tree_recursive()</title>
<updated>2008-07-15T14:17:59Z</updated>
<author>
<name>René Scharfe</name>
<email>rene.scharfe@lsrfire.ath.cx</email>
</author>
<published>2008-07-14T19:22:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=671f0707212c929533dc6ec9e032faee328e4602'/>
<id>urn:sha1:671f0707212c929533dc6ec9e032faee328e4602</id>
<content type='text'>
Add a pointer parameter to read_tree_recursive(), which is passed to the
callback function.  This allows callers of read_tree_recursive() to
share data with the callback without resorting to global variables.  All
current callers pass NULL.

Signed-off-by: Rene Scharfe &lt;rene.scharfe@lsrfire.ath.cx&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Remove last vestiges of generic tree_entry_list</title>
<updated>2006-05-30T02:08:37Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@osdl.org</email>
</author>
<published>2006-05-29T19:21:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=15b5536ee47c6684806edd7725adbbdede9fb95c'/>
<id>urn:sha1:15b5536ee47c6684806edd7725adbbdede9fb95c</id>
<content type='text'>
The old tree_entry_list is dead, long live the unified single tree
parser.

Yes, we now still have a compatibility function to create a bogus
tree_entry_list in builtin-read-tree.c, but that is now entirely local
to that very messy piece of code.

I'd love to clean read-tree.c up too, but I'm too scared right now, so
the best I can do is to just contain the damage, and try to make sure
that no new users of the tree_entry_list sprout up by not having it as
an exported interface any more.

Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>Remove unused "zeropad" entry from tree_list_entry</title>
<updated>2006-05-30T02:08:25Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@osdl.org</email>
</author>
<published>2006-05-29T19:19:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3bc1eca91e5230739cfb488e63fae35a166a07de'/>
<id>urn:sha1:3bc1eca91e5230739cfb488e63fae35a166a07de</id>
<content type='text'>
That was a hack, only needed because 'git fsck-objects' didn't look at
the raw tree format.  Now that fsck traverses the tree itself, we can
drop it.

Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
</feed>
