commit | b4600fbe071898068ef30be2766ee75880ec308b | [log] [tgz] |
---|---|---|
author | Jeff King <peff@peff.net> | Thu Sep 24 17:07:43 2015 -0400 |
committer | Junio C Hamano <gitster@pobox.com> | Mon Oct 05 11:08:04 2015 -0700 |
tree | ee50a70d3f17743800de7bd4726cb917029a01fb | |
parent | bd22d4ffbc10052fef1a6c52aec066ee64236340 [diff] |
merge-recursive: convert malloc / strcpy to strbuf This would be a fairly routine use of xstrfmt, except that we need to remember the length of the result to pass to cache_name_pos. So just use a strbuf, which makes this simple. As a bonus, this gets rid of confusing references to "pathlen+1". The "1" is for the trailing slash we added, but that is automatically accounted for in the strbuf's len parameter. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>