diff --git a/builtin-clone.c b/builtin-clone.c index c0e3086437ced05d1b81d4098e3a4c7c3031b0ee..f44eceab3a31ba38baaa5cbec366e69a989183d2 100644 --- a/builtin-clone.c +++ b/builtin-clone.c @@ -387,7 +387,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix) path = get_repo_path(repo_name, &is_bundle); if (path) - repo = path; + repo = xstrdup(make_nonrelative_path(repo_name)); else if (!strchr(repo_name, ':')) repo = xstrdup(make_absolute_path(repo_name)); else diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh index be9ee9326fc4590dcc875e31b6cf64b800451bc5..c4496635dfba85b0e9fc105c4516096d433881a4 100755 --- a/t/t5505-remote.sh +++ b/t/t5505-remote.sh @@ -109,7 +109,7 @@ test_expect_success 'remove remote' ' cat > test/expect << EOF * remote origin - URL: $(pwd)/one/.git + URL: $(pwd)/one Remote branch merged with 'git pull' while on branch master master New remote branch (next fetch will store in remotes/origin) @@ -140,7 +140,7 @@ test_expect_success 'show' ' cat > test/expect << EOF * remote origin - URL: $(pwd)/one/.git + URL: $(pwd)/one Remote branch merged with 'git pull' while on branch master master Tracked remote branches @@ -169,7 +169,7 @@ test_expect_success 'prune' ' cat > test/expect << EOF Pruning origin -URL: $(pwd)/one/.git +URL: $(pwd)/one * [would prune] origin/side2 EOF