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>
Junio C Hamano committed
Aug 30, 2007 at 19:17 UTC
55ced83d8aca98277c6a495932c57e6c3c45930b
1 file changed
+1
-1
git-filter-branch.sh
+1
-1
@@ -140,7 +140,7 @@ do
140
filter_subdir="$OPTARG"
141
;;
142
--original)
143
- orig_namespace="$OPTARG"
143
+ orig_namespace=$(expr "$OPTARG/" : '\(.*[^/]\)/*$')/
144
;;
145
*)
146
usage