filter-branch: make sure orig_namespace ends with a single slash.
[gitweb.git] / git-filter-branch.sh
index ec2f75de56799bc404f62c76e24b2dfa3f82b6f7..c166c978ec2a6e1dc26d8fb117c12ae59ca5b7fd 100755 (executable)
@@ -140,7 +140,7 @@ do
                filter_subdir="$OPTARG"
                ;;
        --original)
-               orig_namespace="$OPTARG"
+               orig_namespace=$(expr "$OPTARG/" : '\(.*[^/]\)/*$')/
                ;;
        *)
                usage