Thread (48 messages) flat view 48 messages, 1 author, 2016-06-15
STALE3748d

[PATCH 15/20] worktree: avoid 0{40}, too many zeroes, hard to read

From: Nguyễn Thái Ngọc Duy <hidden>
Date: 2016-06-15 23:08:04
Subsystem: the rest · Maintainer: Linus Torvalds

Signed-off-by: Nguyễn Thái Ngọc Duy <redacted>
---
 builtin/worktree.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/worktree.c b/builtin/worktree.c
index 7b217fb..f490ca3 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree.c
@@ -263,7 +263,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, "0000000000000000000000000000000000000000");
+	write_file(sb.buf, sha1_to_hex(null_sha1));
 	strbuf_reset(&sb);
 	strbuf_addf(&sb, "%s/commondir", sb_repo.buf);
 	write_file(sb.buf, "../..");
-- 
2.7.0.377.g4cd97dd
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help