{"thread":{"id":"5544","subject":"Re: Make ref resolution saner","startedAt":"2006-09-12T18:57:28Z","lastAt":"2006-09-12T18:57:28Z","messageCount":1,"participants":["linux@horizon.com"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"26775","messageId":"20060912185728.29885.qmail@science.horizon.com","threadId":"5544","inReplyTo":null,"subject":"Re: Make ref resolution saner","fromName":"","fromEmail":"linux@horizon.com","sentAt":"2006-09-12T18:57:28Z","receivedAt":"2006-09-12T18:57:28Z","isPatch":false,"sender":{"key":"linux@horizon.com","avatar":null},"body":"I just noticed as part of that patch that building the path of\n$GIT_DIR/HEAD is no longer necessary, which is the middle hunk,\nand the other two jumped out at me while looking at the code.\n\n(On top of Linus' patch.)\n\ndiff --git a/builtin-init-db.c b/builtin-init-db.c\nindex 23b7714..f4a6d1f 100644\n--- a/builtin-init-db.c\n+++ b/builtin-init-db.c\n@@ -203,7 +203,6 @@ static void create_default_files(const c\n \t * shared-repository settings, we would need to fix them up.\n \t */\n \tif (shared_repository) {\n-\t\tpath[len] = 0;\n \t\tadjust_shared_perm(path);\n \t\tstrcpy(path + len, \"refs\");\n \t\tadjust_shared_perm(path);\n@@ -217,7 +216,6 @@ static void create_default_files(const c\n \t * Create the default symlink from \".git/HEAD\" to the \"master\"\n \t * branch, if it does not exist yet.\n \t */\n-\tstrcpy(path + len, \"HEAD\");\n \tif (read_ref(\"HEAD\", sha1) < 0) {\n \t\tif (create_symref(\"HEAD\", \"refs/heads/master\") < 0)\n \t\t\texit(1);\n@@ -227,7 +225,6 @@ static void create_default_files(const c\n \tsprintf(repo_version_string, \"%d\", GIT_REPO_VERSION);\n \tgit_config_set(\"core.repositoryformatversion\", repo_version_string);\n \n-\tpath[len] = 0;\n \tstrcpy(path + len, \"config\");\n \n \t/* Check filemode trustability */\n"}]}