Re: [PATCH v4 02/27] Convert git_snpath() to strbuf_git_path()

2014-03-06 Thread Eric Sunshine
On Fri, Mar 7, 2014 at 12:03 AM, Duy Nguyen wrote: > On Mon, Mar 3, 2014 at 7:15 AM, Duy Nguyen wrote: >> On Mon, Mar 3, 2014 at 7:02 AM, Eric Sunshine >> wrote: >>> On Sat, Mar 1, 2014 at 7:12 AM, Nguyễn Thái Ngọc Duy >>> wrote: In the previous patch, git_snpath() is modified to allocat

Re: [PATCH v4 02/27] Convert git_snpath() to strbuf_git_path()

2014-03-06 Thread Duy Nguyen
On Mon, Mar 3, 2014 at 7:15 AM, Duy Nguyen wrote: > On Mon, Mar 3, 2014 at 7:02 AM, Eric Sunshine wrote: >> On Sat, Mar 1, 2014 at 7:12 AM, Nguyễn Thái Ngọc Duy >> wrote: >>> In the previous patch, git_snpath() is modified to allocate a new >>> strbuf buffer because vsnpath() needs that. But th

Re: [PATCH v4 02/27] Convert git_snpath() to strbuf_git_path()

2014-03-02 Thread Duy Nguyen
On Mon, Mar 3, 2014 at 7:02 AM, Eric Sunshine wrote: > On Sat, Mar 1, 2014 at 7:12 AM, Nguyễn Thái Ngọc Duy > wrote: >> In the previous patch, git_snpath() is modified to allocate a new >> strbuf buffer because vsnpath() needs that. But that makes it awkward >> because git_snpath() receives a pr

Re: [PATCH v4 02/27] Convert git_snpath() to strbuf_git_path()

2014-03-02 Thread Eric Sunshine
On Sat, Mar 1, 2014 at 7:12 AM, Nguyễn Thái Ngọc Duy wrote: > In the previous patch, git_snpath() is modified to allocate a new > strbuf buffer because vsnpath() needs that. But that makes it awkward > because git_snpath() receives a pre-allocated buffer from outside and > has to copy data back. R

[PATCH v4 02/27] Convert git_snpath() to strbuf_git_path()

2014-03-01 Thread Nguyễn Thái Ngọc Duy
In the previous patch, git_snpath() is modified to allocate a new strbuf buffer because vsnpath() needs that. But that makes it awkward because git_snpath() receives a pre-allocated buffer from outside and has to copy data back. Rename it to strbuf_git_path() and make it receive strbuf directly. T