Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'nd/fixup-linked-gitdir'
author
Junio C Hamano
<gitster@pobox.com>
Tue, 1 Sep 2015 23:31:06 +0000
(16:31 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 1 Sep 2015 23:31:07 +0000
(16:31 -0700)
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
1
2
setup.c
patch
|
diff1
|
diff2
|
blob
|
history
raw
|
combined
(merge:
1616360
82fde87
)
diff --cc
setup.c
index a206781d58d535887be3f8a86bfda56c5d119d95,465b42a1d7aecc3991c9dd2c592d8fa164ba545e..a17c51e61d75ac8280bf04d95c50d7bdfd6d7a0e
---
1
/
setup.c
---
2
/
setup.c
+++ b/
setup.c
@@@
-402,9
-402,9
+402,9
@@@
static void update_linked_gitdir(const
struct strbuf path = STRBUF_INIT;
struct stat st;
- strbuf_addf(&path, "%s/git
file
", gitdir);
+ strbuf_addf(&path, "%s/git
dir
", gitdir);
if (stat(path.buf, &st) || st.st_mtime + 24 * 3600 < time(NULL))
- write_file_gently(path.buf, "%s", gitfile);
- write_file(path.buf, 1, "%s\n", gitfile);
++ write_file(path.buf, "%s", gitfile);
strbuf_release(&path);
}