<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/walker.c, branch v2.0.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.0.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.0.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2014-03-25T22:09:24Z</updated>
<entry>
<title>object.h: centralize object flag allocation</title>
<updated>2014-03-25T22:09:24Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2014-03-25T13:23:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=208acbfb82f722fb22320c381e7da8c8fb2e37e8'/>
<id>urn:sha1:208acbfb82f722fb22320c381e7da8c8fb2e37e8</id>
<content type='text'>
While the field "flags" is mainly used by the revision walker, it is
also used in many other places. Centralize the whole flag allocation to
one place for a better overview (and easier to move flags if we have
too).

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>Change check_ref_format() to take a flags argument</title>
<updated>2011-10-05T20:45:29Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2011-09-15T21:10:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8d9c50105f908b2adde4b7c77537cf95f19cd893'/>
<id>urn:sha1:8d9c50105f908b2adde4b7c77537cf95f19cd893</id>
<content type='text'>
Change check_ref_format() to take a flags argument that indicates what
is acceptable in the reference name (analogous to "git
check-ref-format"'s "--allow-onelevel" and "--refspec-pattern").  This
is more convenient for callers and also fixes a failure in the test
suite (and likely elsewhere in the code) by enabling "onelevel" and
"refspec-pattern" to be allowed independently of each other.

Also rename check_ref_format() to check_refname_format() to make it
obvious that it deals with refnames rather than references themselves.

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>commit: Add commit_list prefix in two function names.</title>
<updated>2010-11-29T22:01:52Z</updated>
<author>
<name>Thiago Farina</name>
<email>tfransosi@gmail.com</email>
</author>
<published>2010-11-27T01:58:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=47e44ed1dc17d3a94ec4bf8dd29810ab7882041c'/>
<id>urn:sha1:47e44ed1dc17d3a94ec4bf8dd29810ab7882041c</id>
<content type='text'>
Add commit_list prefix to insert_by_date function and to sort_by_date,
so it's clear that these functions refer to commit_list structure.

Signed-off-by: Thiago Farina &lt;tfransosi@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>janitor: useless checks before free</title>
<updated>2009-07-23T04:57:41Z</updated>
<author>
<name>Pierre Habouzit</name>
<email>madcoder@debian.org</email>
</author>
<published>2009-07-22T21:51:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=24deea5273709f3685f981c33468a0cead6cc147'/>
<id>urn:sha1:24deea5273709f3685f981c33468a0cead6cc147</id>
<content type='text'>
Signed-off-by: Pierre Habouzit &lt;madcoder@debian.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Drop double-semicolon in C</title>
<updated>2009-02-11T06:26:37Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2009-02-11T01:42:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ba19a808aa871f0eb20aaeeb205e086b04b726dc'/>
<id>urn:sha1:ba19a808aa871f0eb20aaeeb205e086b04b726dc</id>
<content type='text'>
The worst offenders are "continue;;" and "break;;" in switch statements.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>make alloc_ref_from_str() the new alloc_ref()</title>
<updated>2008-10-18T13:53:47Z</updated>
<author>
<name>René Scharfe</name>
<email>rene.scharfe@lsrfire.ath.cx</email>
</author>
<published>2008-10-18T08:44:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=59c69c0c656ebce2f7ce870b4913512597a98390'/>
<id>urn:sha1:59c69c0c656ebce2f7ce870b4913512597a98390</id>
<content type='text'>
With all calls to alloc_ref() gone, we can remove it and then we're free
to give alloc_ref_from_str() the shorter name.  It's a much nicer
interface, as the callers always need to have a name string when they
allocate a ref anyway and don't need to calculate and pass its length+1
any more.

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>Replace calls to strbuf_init(&amp;foo, 0) with STRBUF_INIT initializer</title>
<updated>2008-10-12T19:36:19Z</updated>
<author>
<name>Brandon Casey</name>
<email>casey@nrlssc.navy.mil</email>
</author>
<published>2008-10-09T19:12:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f285a2d7ed6548666989406de8f0e7233eb84368'/>
<id>urn:sha1:f285a2d7ed6548666989406de8f0e7233eb84368</id>
<content type='text'>
Many call sites use strbuf_init(&amp;foo, 0) to initialize local
strbuf variable "foo" which has not been accessed since its
declaration. These can be replaced with a static initialization
using the STRBUF_INIT macro which is just as readable, saves a
function call, and takes up fewer lines.

Signed-off-by: Brandon Casey &lt;casey@nrlssc.navy.mil&gt;
Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
</content>
</entry>
<entry>
<title>Fix "git clone http://$URL" to check out the worktree when asked</title>
<updated>2008-06-04T20:33:25Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2008-06-04T18:38:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=541fc218e6541ae94b3b1bc9e613f7bc879f6841'/>
<id>urn:sha1:541fc218e6541ae94b3b1bc9e613f7bc879f6841</id>
<content type='text'>
The builtin-clone now does the http commit walking and the tree unpacking
in the same process, and the commit walker leaves the in-core objects in a
funny state.  When forgetting the data read from the tree object, the
object should be marked "not parsed yet" for later users.

Acked-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>alloc_ref_from_str(): factor out a common pattern of alloc_ref from string</title>
<updated>2008-05-11T16:04:37Z</updated>
<author>
<name>Krzysztof Kowalczyk</name>
<email>kkowalczyk@gmail.com</email>
</author>
<published>2008-05-10T23:26:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=737922aa648c43bc6a61170bee5bfd46ff953f32'/>
<id>urn:sha1:737922aa648c43bc6a61170bee5bfd46ff953f32</id>
<content type='text'>
Also fix an underallocation in walker.c::interpret_target().

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