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>
This commit is contained in:
parent
fa262cac76
commit
dabd35f4cd
@ -262,7 +262,7 @@ static int add_worktree(const char *path, const char *refname,
|
||||
*/
|
||||
strbuf_reset(&sb);
|
||||
strbuf_addf(&sb, "%s/HEAD", sb_repo.buf);
|
||||
write_file(sb.buf, sha1_to_hex(null_sha1));
|
||||
write_file(sb.buf, "%s", sha1_to_hex(null_sha1));
|
||||
strbuf_reset(&sb);
|
||||
strbuf_addf(&sb, "%s/commondir", sb_repo.buf);
|
||||
write_file(sb.buf, "../..");
|
||||
|
Loading…
Reference in New Issue
Block a user