Skip to content

Commit

Permalink
Merge branch 'as/subtree-with-spaces'
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Junio C Hamano committed Oct 5, 2015
2 parents e6f11c1 + 5b6ab38 commit a66aa25
Show file tree
Hide file tree
Showing 2 changed files with 124 additions and 74 deletions.
4 changes: 2 additions & 2 deletions contrib/subtree/git-subtree.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading

0 comments on commit a66aa25

Please sign in to comment.