Re: [PATCH 2/7] worktree.c: rewrite mark_current_worktree() to avoid strbuf

2016-05-10 Thread Eric Sunshine
On Tue, May 10, 2016 at 10:15 AM, Nguyễn Thái Ngọc Duy wrote: > strbuf is a bit overkill for this function. What we need is call s/is call/is to call/ > absolute_path() twice and make sure the second call does not destroy the > result of the first. One buffer allocation is enough. The patch its

[PATCH 2/7] worktree.c: rewrite mark_current_worktree() to avoid strbuf

2016-05-10 Thread Nguyễn Thái Ngọc Duy
strbuf is a bit overkill for this function. What we need is call absolute_path() twice and make sure the second call does not destroy the result of the first. One buffer allocation is enough. Signed-off-by: Nguyễn Thái Ngọc Duy --- worktree.c | 16 +++- 1 file changed, 7 insertions(+