<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/wrapper.c, branch v1.7.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v1.7.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v1.7.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2010-06-13T18:21:21Z</updated>
<entry>
<title>Merge branch 'js/try-to-free-stackable'</title>
<updated>2010-06-13T18:21:21Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2010-06-13T18:21:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=44e08b003d37440fba6589c07a9573df9d28e6f5'/>
<id>urn:sha1:44e08b003d37440fba6589c07a9573df9d28e6f5</id>
<content type='text'>
* js/try-to-free-stackable:
  Do not call release_pack_memory in malloc wrappers when GIT_TRACE is used
  Have set_try_to_free_routine return the previous routine
</content>
</entry>
<entry>
<title>Merge branch 'np/malloc-threading'</title>
<updated>2010-05-21T11:02:16Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2010-05-21T11:02:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ea5f75a64ae52590b06713d45d84de03ca109ccc'/>
<id>urn:sha1:ea5f75a64ae52590b06713d45d84de03ca109ccc</id>
<content type='text'>
* np/malloc-threading:
  Thread-safe xmalloc and xrealloc needs a recursive mutex
  Make xmalloc and xrealloc thread-safe
</content>
</entry>
<entry>
<title>Have set_try_to_free_routine return the previous routine</title>
<updated>2010-05-09T05:27:54Z</updated>
<author>
<name>Johannes Sixt</name>
<email>j6t@kdbg.org</email>
</author>
<published>2010-05-08T15:13:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=851c34b04e0ce866e15c28e144986eca7533a6f4'/>
<id>urn:sha1:851c34b04e0ce866e15c28e144986eca7533a6f4</id>
<content type='text'>
This effectively requires from the callers of set_try_to_free_routine to
treat the try-to-free-routines as a stack.

We will need this for the next patch where the only current caller cannot
depend on that the previously set routine was the default routine.

Signed-off-by: Johannes Sixt &lt;j6t@kdbg.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Introduce remove_or_warn function</title>
<updated>2010-03-28T16:53:04Z</updated>
<author>
<name>Peter Collingbourne</name>
<email>peter@pcc.me.uk</email>
</author>
<published>2010-03-26T15:25:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=80d706afed6c6c6fb3ac9c168a6a958244405b45'/>
<id>urn:sha1:80d706afed6c6c6fb3ac9c168a6a958244405b45</id>
<content type='text'>
This patch introduces the remove_or_warn function which is a
generalised version of the {unlink,rmdir}_or_warn functions.  It takes
an additional parameter indicating the mode of the file to be removed.

The patch also modifies certain functions to use remove_or_warn
where appropriate, and adds a test case for a bug fixed by the use
of remove_or_warn.

Signed-off-by: Peter Collingbourne &lt;peter@pcc.me.uk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Implement the rmdir_or_warn function</title>
<updated>2010-03-28T16:53:01Z</updated>
<author>
<name>Peter Collingbourne</name>
<email>peter@pcc.me.uk</email>
</author>
<published>2010-03-26T15:25:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d1723296af67e6bbadf6e73cd1e921aefafe491f'/>
<id>urn:sha1:d1723296af67e6bbadf6e73cd1e921aefafe491f</id>
<content type='text'>
This patch implements an rmdir_or_warn function (like unlink_or_warn
but for directories) that uses the generalised warning code in
warn_if_unremovable.

Signed-off-by: Peter Collingbourne &lt;peter@pcc.me.uk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Generalise the unlink_or_warn function</title>
<updated>2010-03-28T16:52:59Z</updated>
<author>
<name>Peter Collingbourne</name>
<email>peter@pcc.me.uk</email>
</author>
<published>2010-03-26T15:25:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=10e13ec8ed36019d131d27cd9fe2e8cc0f99b896'/>
<id>urn:sha1:10e13ec8ed36019d131d27cd9fe2e8cc0f99b896</id>
<content type='text'>
This patch moves the warning code of the unlink_or_warn function into
a separate function named warn_if_unremovable so that it may be reused.

Signed-off-by: Peter Collingbourne &lt;peter@pcc.me.uk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Make xmalloc and xrealloc thread-safe</title>
<updated>2010-03-24T21:15:09Z</updated>
<author>
<name>Nicolas Pitre</name>
<email>nico@fluxnic.net</email>
</author>
<published>2010-03-24T20:22:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a9a746364bd26d333c7229c6f7e851b507cd284a'/>
<id>urn:sha1:a9a746364bd26d333c7229c6f7e851b507cd284a</id>
<content type='text'>
By providing a hook for the routine responsible for trying to free some
memory on malloc failure, we can ensure that the  called routine is
protected by the appropriate locks when threads are in play.

The obvious offender here was pack-objects which was calling xmalloc()
within threads while release_pack_memory() is not thread safe.

Signed-off-by: Nicolas Pitre &lt;nico@fluxnic.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Use git_mkstemp_mode and xmkstemp_mode in odb_mkstemp, not chmod later.</title>
<updated>2010-02-22T23:24:46Z</updated>
<author>
<name>Matthieu Moy</name>
<email>Matthieu.Moy@imag.fr</email>
</author>
<published>2010-02-22T22:32:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f80c7ae8fe9c0f3ce93c96a2dccaba34e456e33a'/>
<id>urn:sha1:f80c7ae8fe9c0f3ce93c96a2dccaba34e456e33a</id>
<content type='text'>
We used to create 0600 files, and then use chmod to set the group and
other permission bits to the umask. This usually has the same effect
as a normal file creation with a umask.

But in the presence of ACLs, the group permission plays the role of
the ACL mask: the "g" bits of newly created files are chosen according
to default ACL mask of the directory, not according to the umask, and
doing a chmod() on these "g" bits affect the ACL's mask instead of
actual group permission.

In other words, creating files with 0600 and then doing a chmod to the
umask creates files which are unreadable by users allowed in the
default ACL. To create the files without breaking ACLs, we let the
umask do it's job at the file's creation time, and get rid of the
later chmod.

Signed-off-by: Matthieu Moy &lt;Matthieu.Moy@imag.fr&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git_mkstemp_mode, xmkstemp_mode: variants of gitmkstemps with mode argument.</title>
<updated>2010-02-22T23:24:45Z</updated>
<author>
<name>Matthieu Moy</name>
<email>Matthieu.Moy@imag.fr</email>
</author>
<published>2010-02-22T22:32:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b862b61c03797fd00490bb8caf05be840b79c6cb'/>
<id>urn:sha1:b862b61c03797fd00490bb8caf05be840b79c6cb</id>
<content type='text'>
gitmkstemps emulates the behavior of mkstemps, which is usually used
to create files in a shared directory like /tmp/, hence, it creates
files with permission 0600.

Add git_mkstemps_mode() that allows us to specify the desired mode, and
make git_mkstemps() a wrapper that always uses 0600 to call it. Later we
will use git_mkstemps_mode() when creating pack files.

Signed-off-by: Matthieu Moy &lt;Matthieu.Moy@imag.fr&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Add xmallocz()</title>
<updated>2010-01-26T20:57:53Z</updated>
<author>
<name>Ilari Liusvaara</name>
<email>ilari.liusvaara@elisanet.fi</email>
</author>
<published>2010-01-26T18:24:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5bf9219d01b16444b316fe764b58d15bd9265f74'/>
<id>urn:sha1:5bf9219d01b16444b316fe764b58d15bd9265f74</id>
<content type='text'>
Add routine for allocating NUL-terminated memory block without risking
integer overflow in addition of +1 for NUL byte.

[jc: with suggestion from Bill Lear]

Signed-off-by: Ilari Liusvaara &lt;ilari.liusvaara@elisanet.fi&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
