<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/git.git/object.c, branch v1.7.7.4</title>
<subtitle>Git
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.7.7.4</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.7.7.4'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/'/>
<updated>2011-05-15T22:23:33Z</updated>
<entry>
<title>read_sha1_file(): get rid of read_sha1_file_repl() madness</title>
<updated>2011-05-15T22:23:33Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-05-15T19:54:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=4bbf5a2615420ac50c696b72dc303727e6218562'/>
<id>urn:sha1:4bbf5a2615420ac50c696b72dc303727e6218562</id>
<content type='text'>
Most callers want to silently get a replacement object, and they do not
care what the real name of the replacement object is.  Worse yet, no sane
interface to return the underlying object without replacement is provided.

Remove the function and make only the few callers that want the name of
the replacement object find it themselves.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'maint'</title>
<updated>2010-09-06T07:12:04Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2010-09-06T07:12:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=4682693e9ccc04252d0fad6f5627fc056abcdbba'/>
<id>urn:sha1:4682693e9ccc04252d0fad6f5627fc056abcdbba</id>
<content type='text'>
* maint:
  tag.c: whitespace breakages fix
  Fix whitespace issue in object.c
  t5505: add missing &amp;&amp;
</content>
</entry>
<entry>
<title>Merge branch 'xx/trivial' into maint</title>
<updated>2010-09-06T07:11:59Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2010-09-06T07:11:59Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=af24059fa299f1656692f5807eddd3b30b5f3cfb'/>
<id>urn:sha1:af24059fa299f1656692f5807eddd3b30b5f3cfb</id>
<content type='text'>
* xx/trivial:
  tag.c: whitespace breakages fix
  Fix whitespace issue in object.c
  t5505: add missing &amp;&amp;
</content>
</entry>
<entry>
<title>Fix whitespace issue in object.c</title>
<updated>2010-09-06T05:12:29Z</updated>
<author>
<name>Jared Hance</name>
<email>jaredhance@gmail.com</email>
</author>
<published>2010-09-05T19:36:33Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=55b4e9e43227632dd372f916c08dca6e26118af5'/>
<id>urn:sha1:55b4e9e43227632dd372f916c08dca6e26118af5</id>
<content type='text'>
Change some expanded tabs (spaces) to tabs in object.c.

Signed-off-by: Jared Hance &lt;jaredhance@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'nd/maint-fix-replace'</title>
<updated>2010-09-04T05:23:13Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2010-09-04T05:23:13Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=f92d62ec4ead67109418483b65aaf158b7462121'/>
<id>urn:sha1:f92d62ec4ead67109418483b65aaf158b7462121</id>
<content type='text'>
* nd/maint-fix-replace:
  parse_object: pass on the original sha1, not the replaced one
</content>
</entry>
<entry>
<title>parse_object: pass on the original sha1, not the replaced one</title>
<updated>2010-09-04T05:13:08Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2010-09-03T20:51:53Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=2e3400c0521e4997601916790b8b2a9ff588c6f3'/>
<id>urn:sha1:2e3400c0521e4997601916790b8b2a9ff588c6f3</id>
<content type='text'>
Commit 0e87c36 (object: call "check_sha1_signature" with the
replacement sha1) changed the first argument passed to
parse_object_buffer() from "sha1" to "repl". With that change,
the returned obj pointer has the replacement SHA1 in obj-&gt;sha1,
not the original one.

But when using lookup_commit() and then parse_commit() on a
commit, we get an object pointer with the original sha1, but
the commit content comes from the replacement commit.

So the result we get from using parse_object() is different
from the we get from using lookup_commit() followed by
parse_commit().

It looks much simpler and safer to fix this inconsistency by
passing "sha1" to parse_object_bufer() instead of "repl".

The commit comment should be used to tell the the replacement
commit is replacing another commit and why. So it should be
easy to see that we have a replacement commit instead of an
original one.

And it is not a problem if the content of the commit is not
consistent with the sha1 as cat-file piped to hash-object can
be used to see the difference.

Signed-off-by: Christian Couder &lt;chriscool@tuxfamily.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>fix "bundle --stdin" segfault</title>
<updated>2010-04-20T05:16:35Z</updated>
<author>
<name>Jonathan Nieder</name>
<email>jrnieder@gmail.com</email>
</author>
<published>2010-04-19T08:03:40Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=97a20eea199f490760cc25b1b7df28361f54e536'/>
<id>urn:sha1:97a20eea199f490760cc25b1b7df28361f54e536</id>
<content type='text'>
When passed an empty list, objects_array_remove_duplicates() corrupts it
by changing the number of entries from 0 to 1.

The problem lies in the condition of its main loop:

	for (ref = 0; ref &lt; array-&gt;nr - 1; ref++) {

The loop body manipulates the supplied object array.  In the case of an
empty array, it should not be doing anything at all.  But array-&gt;nr is an
unsigned quantity, so the code enters the loop, in particular increasing
array-&gt;nr.  Fix this by comparing (ref + 1 &lt; array-&gt;nr) instead.

This bug can be triggered by git bundle --stdin:

	$ echo HEAD | git bundle create some.bundle --stdin’
	Segmentation fault (core dumped)

The list of commits to bundle appears to be empty because of another bug:
by the time the revision-walking machinery gets to look at it, standard
input has already been consumed by rev-list, so this function gets an
empty list of revisions.

After this patch, git bundle --stdin still does not work; it just doesn’t
segfault any more.

Reported-by: Joey Hess &lt;joey@kitenet.net&gt;
Signed-off-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>object.c: remove unused functions</title>
<updated>2010-01-18T06:49:36Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2010-01-12T05:15:12Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=c76189875b35ca04d42df915cd902a33fdbcb9b0'/>
<id>urn:sha1:c76189875b35ca04d42df915cd902a33fdbcb9b0</id>
<content type='text'>
object_list_append() and object_list_length}() are not used anywhere.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>object: call "check_sha1_signature" with the replacement sha1</title>
<updated>2009-06-01T00:02:59Z</updated>
<author>
<name>Christian Couder</name>
<email>chriscool@tuxfamily.org</email>
</author>
<published>2009-01-23T09:07:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=0e87c36763a384d5bf6fae4bda44fd035c0b75ff'/>
<id>urn:sha1:0e87c36763a384d5bf6fae4bda44fd035c0b75ff</id>
<content type='text'>
Otherwise we get a "sha1 mismatch" error for replaced objects.

Signed-off-by: Christian Couder &lt;chriscool@tuxfamily.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Unify signedness in hashing calls</title>
<updated>2009-05-20T07:02:24Z</updated>
<author>
<name>Dan McGee</name>
<email>dpmcgee@gmail.com</email>
</author>
<published>2009-05-19T04:34:02Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=91fe2f909154c5cda3b40c68e72c3172a7f137f6'/>
<id>urn:sha1:91fe2f909154c5cda3b40c68e72c3172a7f137f6</id>
<content type='text'>
Our hash_obj and hashtable_index calls and functions were doing a lot of
funny things with signedness. Unify all of it to 'unsigned int'.

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