contrib/subtree: respect spaces in a repository path

Remote repository may have spaces in its path, so take it into account.

Also, as far as there are no tests for the `push` command, add them.

Signed-off-by: Alexey Shumkin <Alex.Crezoff@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Alexey Shumkin
2015-09-05 01:24:11 +03:00
committed by Junio C Hamano
parent c61eb4106d
commit 5b6ab38bd3
2 changed files with 48 additions and 1 deletions

View File

@ -735,7 +735,7 @@ cmd_push()
refspec=$2
echo "git push using: " $repository $refspec
localrev=$(git subtree split --prefix="$prefix") || die
git push $repository $localrev:refs/heads/$refspec
git push "$repository" $localrev:refs/heads/$refspec
else
die "'$dir' must already exist. Try 'git subtree add'."
fi