submodule--helper, module_clone: always operate on absolute paths

When giving relative paths to `relative_path` to compute a relative path
from one directory to another, this may fail in `relative_path`.
Make sure both arguments to `relative_path` are always absolute.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Stefan Beller
2016-03-31 17:17:28 -07:00
committed by Junio C Hamano
parent 47d5d64879
commit f8eaa0ba98
2 changed files with 15 additions and 15 deletions

View File

@ -818,7 +818,7 @@ test_expect_success 'submodule add --name allows to replace a submodule with ano
)
'
test_expect_failure 'recursive relative submodules stay relative' '
test_expect_success 'recursive relative submodules stay relative' '
test_when_finished "rm -rf super clone2 subsub sub3" &&
mkdir subsub &&
(