summaryrefslogtreecommitdiff
path: root/contrib/subtree/git-subtree.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2015-10-05 12:30:15 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-10-05 12:30:15 -0700
commita66aa25afbd957bf0ab25d8875d42d28b921c09e (patch)
treeb2dd0badf3d26185edb3353f6171bf9396fad5f3 /contrib/subtree/git-subtree.sh
parentMerge branch 'jk/connect-clear-env' (diff)
parentcontrib/subtree: respect spaces in a repository path (diff)
downloadtgif-a66aa25afbd957bf0ab25d8875d42d28b921c09e.tar.xz
Merge branch 'as/subtree-with-spaces'
Update "git subtree" (in contrib/) so that it can take whitespaces in the pathnames, not only in the in-tree pathname but the name of the directory that the repository is in. * as/subtree-with-spaces: contrib/subtree: respect spaces in a repository path t7900-subtree: test the "space in a subdirectory name" case
Diffstat (limited to 'contrib/subtree/git-subtree.sh')
-rwxr-xr-xcontrib/subtree/git-subtree.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh
index 9f06571851..308b777b0a 100755
--- a/contrib/subtree/git-subtree.sh
+++ b/contrib/subtree/git-subtree.sh
@@ -648,7 +648,7 @@ cmd_split()
debug "Merging split branch into HEAD..."
latest_old=$(cache_get latest_old)
git merge -s ours \
- -m "$(rejoin_msg $dir $latest_old $latest_new)" \
+ -m "$(rejoin_msg "$dir" $latest_old $latest_new)" \
$latest_new >&2 || exit $?
fi
if [ -n "$branch" ]; then
@@ -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