diff options
author | Junio C Hamano <gitster@pobox.com> | 2007-08-30 19:17:42 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-08-30 19:17:42 -0700 |
commit | 55ced83d8aca98277c6a495932c57e6c3c45930b (patch) | |
tree | 9d5506ccbe966943349f4017532183cbd01df6ed | |
parent | git-filter-branch: document --original option (diff) | |
download | tgif-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-x | git-filter-branch.sh | 2 |
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 |