From: linux@horizon.com
To: git@vger.kernel.org, torvalds@osdl.org
Cc: linux@horizon.com
Subject: Re: Make ref resolution saner
Date: 12 Sep 2006 14:57:28 -0400 [thread overview]
Message-ID: <20060912185728.29885.qmail@science.horizon.com> (raw)
I just noticed as part of that patch that building the path of
$GIT_DIR/HEAD is no longer necessary, which is the middle hunk,
and the other two jumped out at me while looking at the code.
(On top of Linus' patch.)
diff --git a/builtin-init-db.c b/builtin-init-db.c
index 23b7714..f4a6d1f 100644
--- a/builtin-init-db.c
+++ b/builtin-init-db.c
@@ -203,7 +203,6 @@ static void create_default_files(const c
* shared-repository settings, we would need to fix them up.
*/
if (shared_repository) {
- path[len] = 0;
adjust_shared_perm(path);
strcpy(path + len, "refs");
adjust_shared_perm(path);
@@ -217,7 +216,6 @@ static void create_default_files(const c
* Create the default symlink from ".git/HEAD" to the "master"
* branch, if it does not exist yet.
*/
- strcpy(path + len, "HEAD");
if (read_ref("HEAD", sha1) < 0) {
if (create_symref("HEAD", "refs/heads/master") < 0)
exit(1);
@@ -227,7 +225,6 @@ static void create_default_files(const c
sprintf(repo_version_string, "%d", GIT_REPO_VERSION);
git_config_set("core.repositoryformatversion", repo_version_string);
- path[len] = 0;
strcpy(path + len, "config");
/* Check filemode trustability */
next reply other threads:[~2006-09-12 18:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-12 18:57 linux [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-09-11 19:03 Allow multiple "git_path()" uses Linus Torvalds
2006-09-11 23:37 ` Start handling references internally as a sorted in-memory list Linus Torvalds
2006-09-12 3:10 ` Add support for negative refs Linus Torvalds
2006-09-12 3:17 ` Make ref resolution saner Linus Torvalds
2006-09-12 5:36 ` Jeff King
2006-09-12 14:41 ` Linus Torvalds
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060912185728.29885.qmail@science.horizon.com \
--to=linux@horizon.com \
--cc=git@vger.kernel.org \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).