progrium / gitreceive

Easily accept and handle arbitrary git pushes
1.14k stars 108 forks source link

Question re perl regex in gitreceive #24

Open lukebond opened 10 years ago

lukebond commented 10 years ago

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.

progrium commented 10 years ago

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

https://github.com/progrium/gitreceive/commit/37a90033aecb484a9465a64733abb6ed26b9ee9c https://github.com/progrium/gitreceive/commit/3058e7a06e3db7d75ea9f179d2a4230cd8d2f9c5

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