Re: [PATCH] git-filter-branch: document --original option
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 30, 2007, 23:13 UTC
- Message-ID
- <7v3ay07h0h.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <7vodgo7jbn.fsf@gitster.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 6 quoted lines
> I agree we do not give the "portable to version 7" prize > anymore. But you made me realize another thing. > > I think it should make sure orig_namespace has one and only one > trailing slash, because otherwise "--original refs/heads//" > would lead you to the same disaster.
Perhaps,
orig_namespace=$(expr "$OPTARG/" : '\(.*[^/]\)/*$')/
Well, I know people hate colon-expr, but we earlier ruled out (and we still do) ${parameter//pattern/string} as bashism beyond the portability line, and I do not see an alternative easier to read than this...