Skip to content

Commit ef23c34

Browse files
pcloudsgitster
authored andcommitted
worktree: avoid 0{40}, too many zeroes, hard to read
Signed-off-by: Nguyễn Thái Ngọc Duy <[email protected]> Reviewed-by: Eric Sunshine <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent afb9e30 commit ef23c34

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin/worktree.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ static int add_worktree(const char *path, const char *refname,
262262
*/
263263
strbuf_reset(&sb);
264264
strbuf_addf(&sb, "%s/HEAD", sb_repo.buf);
265-
write_file(sb.buf, "0000000000000000000000000000000000000000");
265+
write_file(sb.buf, sha1_to_hex(null_sha1));
266266
strbuf_reset(&sb);
267267
strbuf_addf(&sb, "%s/commondir", sb_repo.buf);
268268
write_file(sb.buf, "../..");

0 commit comments

Comments
 (0)