progrium/gitreceive

Question re perl regex in gitreceive

lukebond opened this issue · 1 comments

Great job on gitreceive, Jeff.

I'm trying to run it on CoreOS and have trouble with this line: https://github.com/progrium/gitreceive/blob/master/gitreceive#L47 because it uses perl, which isn't installed on CoreOS out of the box.

Of course you needn't support every OS under the sun, but if you could explain what this perl regex is doing then I could find another way of doing it. It's beyond my regex skills!

For now, locally, I've replaced the whole line with simply:

    export RECEIVE_REPO="$(echo $SSH_ORIGINAL_COMMAND | awk '{print $2}' | sed s/\'//g)"

...but I'm sure you have your reasons for writing what you did.

I actually didn't add those. But a quick look at blame/history reveals:

37a9003
3058e7a

If you have a way to do this without using perl, I'd love to take it as a PR.