author | Johannes Sixt <j6t@kdbg.org> | |
Sun, 4 Mar 2012 21:16:19 +0000 (22:16 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 5 Mar 2012 05:22:46 +0000 (21:22 -0800) | ||
commit | 4dce7d9b408b2935b85721b54a2010eda7ec1be9 | |
tree | b484dbd119913c5be6d25c969c5416d690490632 | tree | snapshot |
parent | 69c3051780d6cacfe242563296160634dc667a90 | commit | diff |
submodules: fix ambiguous absolute paths under Windows
Under Windows the "git rev-parse --git-dir" and "pwd" commands may return
either drive-letter-colon or POSIX style paths. This makes module_clone()
behave badly because it expects absolute paths to always start with a '/'.
Fix that by always converting the "c:/" notation into "/c/" when computing
the relative paths from gitdir to the submodule work tree and back.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Under Windows the "git rev-parse --git-dir" and "pwd" commands may return
either drive-letter-colon or POSIX style paths. This makes module_clone()
behave badly because it expects absolute paths to always start with a '/'.
Fix that by always converting the "c:/" notation into "/c/" when computing
the relative paths from gitdir to the submodule work tree and back.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-submodule.sh | diff | blob | history |