summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2007-08-30 19:17:42 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2007-08-30 19:17:42 -0700
commit55ced83d8aca98277c6a495932c57e6c3c45930b (patch)
tree9d5506ccbe966943349f4017532183cbd01df6ed
parentgit-filter-branch: document --original option (diff)
downloadtgif-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 ec2f75de56..c166c978ec 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