<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/bundle.c, branch v2.1.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.1.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.1.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2014-09-19T21:05:11Z</updated>
<entry>
<title>Merge branch 'lf/bundle-exclusion' into maint</title>
<updated>2014-09-19T21:05:11Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-09-19T21:05:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ffe41f8d3249384b142b28c233e45621f08db2a1'/>
<id>urn:sha1:ffe41f8d3249384b142b28c233e45621f08db2a1</id>
<content type='text'>
* lf/bundle-exclusion:
  bundle: fix exclusion of annotated tags
</content>
</entry>
<entry>
<title>bundle: fix exclusion of annotated tags</title>
<updated>2014-08-07T22:35:25Z</updated>
<author>
<name>Lukas Fleischer</name>
<email>git@cryptocrack.de</email>
</author>
<published>2014-08-02T08:39:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2c8544ab91812c264666c9feb335ce3091fa29c1'/>
<id>urn:sha1:2c8544ab91812c264666c9feb335ce3091fa29c1</id>
<content type='text'>
In commit c9a42c4 (bundle: allow rev-list options to exclude annotated
tags, 2009-01-02), support for excluding annotated tags outside the
specified date range was added. However, the wrong order of parameters
was chosen when calling memchr().

Fix this by swapping the character to search for with the maximum length
parameter.  Also cover this behavior with an additional test.

Signed-off-by: Lukas Fleischer &lt;git@cryptocrack.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>bundle: use internal argv_array of struct child_process in create_bundle()</title>
<updated>2014-07-18T19:14:47Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2014-07-17T23:27:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=92859f3a7906cf1a1d398307ba21a062984550d6'/>
<id>urn:sha1:92859f3a7906cf1a1d398307ba21a062984550d6</id>
<content type='text'>
Use the existing argv_array member instead of providing our own.  This
way the argv_array is cleared after use automatically for us; it was
leaking before.

Signed-off-by: Rene 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 'nd/log-show-linear-break'</title>
<updated>2014-04-03T19:38:11Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-04-03T19:38:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b407d40933f9c37af16ca3dc275e615ab4fdd8c5'/>
<id>urn:sha1:b407d40933f9c37af16ca3dc275e615ab4fdd8c5</id>
<content type='text'>
Attempts to show where a single-strand-of-pearls break in "git log"
output.

* nd/log-show-linear-break:
  log: add --show-linear-break to help see non-linear history
  object.h: centralize object flag allocation
</content>
</entry>
<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>Merge branch 'sh/use-hashcpy'</title>
<updated>2014-03-18T20:51:05Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-03-18T20:51:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=006f678780e816a2540628e5473b0eea199d0b61'/>
<id>urn:sha1:006f678780e816a2540628e5473b0eea199d0b61</id>
<content type='text'>
* sh/use-hashcpy:
  Use hashcpy() when copying object names
</content>
</entry>
<entry>
<title>Use hashcpy() when copying object names</title>
<updated>2014-03-06T22:03:12Z</updated>
<author>
<name>Sun He</name>
<email>sunheehnus@gmail.com</email>
</author>
<published>2014-03-03T09:39:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=50546b15ed1df25837f8b291e6fa5bbcdb84635e'/>
<id>urn:sha1:50546b15ed1df25837f8b291e6fa5bbcdb84635e</id>
<content type='text'>
We invented hashcpy() to keep the abstraction of "object name"
behind it.  Use it instead of calling memcpy() with hard-coded
20-byte length when moving object names between pieces of memory.

Leave ppc/sha1.c as-is, because the function is about the SHA-1 hash
algorithm whose output is and will always be 20 bytes.

Helped-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Helped-by: Duy Nguyen &lt;pclouds@gmail.com&gt;
Signed-off-by: Sun He &lt;sunheehnus@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>bundle.c: use ALLOC_GROW() in add_to_ref_list()</title>
<updated>2014-03-03T22:44:48Z</updated>
<author>
<name>Dmitry S. Dolzhenko</name>
<email>dmitrys.dolzhenko@yandex.ru</email>
</author>
<published>2014-03-03T22:31:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5cbbe13a9f16e7ddebd186dbf1dddb16185b968f'/>
<id>urn:sha1:5cbbe13a9f16e7ddebd186dbf1dddb16185b968f</id>
<content type='text'>
Signed-off-by: Dmitry S. Dolzhenko &lt;dmitrys.dolzhenko@yandex.ru&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>bundle: use argv-array</title>
<updated>2013-11-12T21:32:11Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-11-12T21:32:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1e2371ea6656beaf94fd706eb414febac88c6398'/>
<id>urn:sha1:1e2371ea6656beaf94fd706eb414febac88c6398</id>
<content type='text'>
Instead of hand-crafted arrays to manage command line arguments
we create internally, use argv-array helpers.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>object_array_entry: fix memory handling of the name field</title>
<updated>2013-06-02T22:28:46Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2013-05-25T09:08:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=31faeb2088ef35d0108ad81df3550513d6cec798'/>
<id>urn:sha1:31faeb2088ef35d0108ad81df3550513d6cec798</id>
<content type='text'>
Previously, the memory management of the object_array_entry::name
field was inconsistent and undocumented.  object_array_entries are
ultimately created by a single function, add_object_array_with_mode(),
which has an argument "const char *name".  This function used to
simply set the name field to reference the string pointed to by the
name parameter, and nobody on the object_array side ever freed the
memory.  Thus, it assumed that the memory for the name field would be
managed by the caller, and that the lifetime of that string would be
at least as long as the lifetime of the object_array_entry.  But
callers were inconsistent:

* Some passed pointers to constant strings or argv entries, which was
  OK.

* Some passed pointers to newly-allocated memory, but didn't arrange
  for the memory ever to be freed.

* Some passed the return value of sha1_to_hex(), which is a pointer to
  a statically-allocated buffer that can be overwritten at any time.

* Some passed pointers to refnames that they received from a
  for_each_ref()-type iteration, but the lifetimes of such refnames is
  not guaranteed by the refs API.

Bring consistency to this mess by changing object_array to make its
own copy for the object_array_entry::name field and free this memory
when an object_array_entry is deleted from the array.

Many callers were passing the empty string as the name parameter, so
as a performance optimization, treat the empty string specially.
Instead of making a copy, store a pointer to a statically-allocated
empty string to object_array_entry::name.  When deleting such an
entry, skip the free().

Change the callers that were already passing copies to
add_object_array_with_mode() to either skip the copy, or (if the
memory needed to be allocated anyway) freeing the memory itself.

A part of this commit effectively reverts

    70d26c6e76 read_revisions_from_stdin: make copies for handle_revision_arg

because the copying introduced by that commit (which is still
necessary) is now done at a deeper level.

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
