avoid using sha1_to_hex output as printf format

We know that it should not contain any percent-signs, but it's a good habit not to feed non-literals to printf formatters. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jeff King committed Jul 8, 2016 at 06:35 UTC dabd35f4cdd8bcfa502d082da5a3e4b927a2b329
1 file changed +1 -1
builtin/worktree.c
+1 -1
@@ -262,7 +262,7 @@ static int add_worktree(const char *path, const char *refname,
262 */
263 strbuf_reset(&sb);
264 strbuf_addf(&sb, "%s/HEAD", sb_repo.buf);
265 - write_file(sb.buf, sha1_to_hex(null_sha1));
265 + write_file(sb.buf, "%s", sha1_to_hex(null_sha1));
266 strbuf_reset(&sb);
267 strbuf_addf(&sb, "%s/commondir", sb_repo.buf);
268 write_file(sb.buf, "../..");