From 55ced83d8aca98277c6a495932c57e6c3c45930b Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 30 Aug 2007 19:17:42 -0700 Subject: 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 diff --git a/git-filter-branch.sh b/git-filter-branch.sh index ec2f75d..c166c97 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 -- cgit v0.10.2-6-g49f6