Re: [PATCH] git-filter-branch: document --original option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

> 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...
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux