Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH 12/12] [TODO] setup: bring changes from 4msysgit/next to next

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:44:53
Subsystem: the rest · Maintainer: Linus Torvalds

Possibly related (same subject, not in this thread)

Steffen Prohaska [off-list ref] writes:
On Jul 2, 2008, at 9:32 PM, Johannes Sixt wrote:
quoted
The setup.c in mingw.git (and soon Junio's master) and Junio's next
are
_different_, but both are correct. If you reverse-apply the patch you
presented here, then you get the version from Junio's next, which is
a good
state.
Ok, I'll wait until Junio's master has the changes and will remove
the changes to 4msysgit then.
There will be a slight difference between the setup.c in soon-to-be master
and j6t/mingw (14086b0), due to recent optimization already on 'master'
from Linus, 044bbbc (Make git_dir a path relative to work_tree in
setup_work_tree(), 2008-06-19).
diff --git a/setup.c b/setup.c
index 8bb7b10..cc3fb38 100644
--- a/setup.c
+++ b/setup.c
@@ -308,9 +308,10 @@ void setup_work_tree(void)
 	work_tree = get_git_work_tree();
 	git_dir = get_git_dir();
 	if (!is_absolute_path(git_dir))
-		set_git_dir(make_absolute_path(git_dir));
+		git_dir = make_absolute_path(git_dir);
 	if (!work_tree || chdir(work_tree))
 		die("This operation must be run in a work tree");
+	set_git_dir(make_relative_path(git_dir, work_tree));
 	initialized = 1;
 }
 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help