summaryrefslogtreecommitdiff
path: root/contrib/subtree/git-subtree.sh
diff options
context:
space:
mode:
authorTechlive Zheng <techlivezheng@gmail.com>2015-11-13 02:32:36 (GMT)
committerJeff King <peff@peff.net>2015-11-13 05:02:56 (GMT)
commitd16031caf106dda2da52f10ef809cf4bfc83f7be (patch)
tree023727f05f07beaf72b341c7492f7e587c73d3e9 /contrib/subtree/git-subtree.sh
parent43711746bd01eff9d8bac658bf1d6a39151088f2 (diff)
downloadgit-d16031caf106dda2da52f10ef809cf4bfc83f7be.zip
git-d16031caf106dda2da52f10ef809cf4bfc83f7be.tar.gz
git-d16031caf106dda2da52f10ef809cf4bfc83f7be.tar.bz2
contrib/subtree: Handle '--prefix' argument with a slash appended
'git subtree merge' will fail if the argument of '--prefix' has a slash appended. Signed-off-by: Techlive Zheng <techlivezheng@gmail.com> Signed-off-by: David A. Greene <greened@obbligato.org> Signed-off-by: Jeff King <peff@peff.net>
Diffstat (limited to 'contrib/subtree/git-subtree.sh')
-rwxr-xr-xcontrib/subtree/git-subtree.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh
index 308b777..edf36f8 100755
--- a/contrib/subtree/git-subtree.sh
+++ b/contrib/subtree/git-subtree.sh
@@ -90,7 +90,7 @@ while [ $# -gt 0 ]; do
--annotate) annotate="$1"; shift ;;
--no-annotate) annotate= ;;
-b) branch="$1"; shift ;;
- -P) prefix="$1"; shift ;;
+ -P) prefix="${1%/}"; shift ;;
-m) message="$1"; shift ;;
--no-prefix) prefix= ;;
--onto) onto="$1"; shift ;;