worktree.c: rewrite mark_current_worktree() to avoid strbuf
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Sun, 22 May 2016 09:33:52 +0000 (16:33 +0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 24 May 2016 20:19:22 +0000 (13:19 -0700)
strbuf is a bit overkill for this function. What we need 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.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
No differences found