aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2007-08-30 19:17:42 -0700
committerJunio C Hamano <gitster@pobox.com>2007-08-30 19:17:42 -0700
commit55ced83d8aca98277c6a495932c57e6c3c45930b (patch)
tree9d5506ccbe966943349f4017532183cbd01df6ed
parent5433235daec11550973f1e290f069ce0c27f53ab (diff)
downloadgit-55ced83d8aca98277c6a495932c57e6c3c45930b.tar.gz
git-55ced83d8aca98277c6a495932c57e6c3c45930b.tar.xz
filter-branch: make sure orig_namespace ends with a single slash.
Later in a loop any existing ref whose path begins with it is removed. It would be a disaster if you allowed it to say refs/head for example. Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xgit-filter-branch.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-filter-branch.sh b/git-filter-branch.sh
index ec2f75de5..c166c978e 100755
--- a/git-filter-branch.sh
+++ b/git-filter-branch.sh
@@ -140,7 +140,7 @@ do
filter_subdir="$OPTARG"
;;
--original)
- orig_namespace="$OPTARG"
+ orig_namespace=$(expr "$OPTARG/" : '\(.*[^/]\)/*$')/
;;
*)
usage