Re: [PATCH v8 27/44] walker.c: use ref transaction for ref updates

2014-05-21 Thread Ronnie Sahlberg
On Tue, May 20, 2014 at 5:46 PM, Jonathan Nieder jrnie...@gmail.com wrote: Ronnie Sahlberg wrote: This changes the locking slightly for walker_fetch. Previously the code would lock all refs before writing them but now we do not lock the refs until the commit stage. There is thus a very short

Re: [PATCH v8 27/44] walker.c: use ref transaction for ref updates

2014-05-20 Thread Jonathan Nieder
Ronnie Sahlberg wrote: This changes the locking slightly for walker_fetch. Previously the code would lock all refs before writing them but now we do not lock the refs until the commit stage. There is thus a very short window where changes could be done locally during the fetch which would be

[PATCH v8 27/44] walker.c: use ref transaction for ref updates

2014-05-15 Thread Ronnie Sahlberg
Switch to using ref transactions in walker_fetch(). As part of the refactoring to use ref transactions we also fix a potential memory leak where in the original code if write_ref_sha1() would fail we would end up returning from the function without free()ing the msg string. This changes the