summaryrefslogtreecommitdiff
path: root/setup.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-09-01 16:31:06 -0700
committerJunio C Hamano <gitster@pobox.com>2015-09-01 16:31:07 -0700
commit91d54694a4e1da804063ce64b9757d5d3148e6ad (patch)
tree76e7ad71adb050aff775e1049455493c9b1952ae /setup.c
parent16163602bacb2804d00d599049a62b7af0b0b7b6 (diff)
parent82fde87ff3be8d10854df18964e5816417a1d7cf (diff)
downloadgit-91d54694a4e1da804063ce64b9757d5d3148e6ad.tar.gz
Merge branch 'nd/fixup-linked-gitdir'
The code in "multiple-worktree" support that attempted to recover from an inconsistent state updated an incorrect file. * nd/fixup-linked-gitdir: setup: update the right file in multiple checkouts
Diffstat (limited to 'setup.c')
-rw-r--r--setup.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/setup.c b/setup.c
index a206781d58..a17c51e61d 100644
--- a/setup.c
+++ b/setup.c
@@ -402,9 +402,9 @@ static void update_linked_gitdir(const char *gitfile, const char *gitdir)
struct strbuf path = STRBUF_INIT;
struct stat st;
- strbuf_addf(&path, "%s/gitfile", gitdir);
+ strbuf_addf(&path, "%s/gitdir", gitdir);
if (stat(path.buf, &st) || st.st_mtime + 24 * 3600 < time(NULL))
- write_file_gently(path.buf, "%s", gitfile);
+ write_file(path.buf, "%s", gitfile);
strbuf_release(&path);
}