remy/5minutefork — pull request #27 by unconed (2013-11-12 21:58:37+00:00)
Title: Validate repo/branch path, strip off .git extension

If you paste in a git clone URL like this:

https://github.com/remy/5minutefork.git

It's accepted, but sends you down an infinite loop, cloning a repo that doesn't exist.

I changed the validation regexp to trim off the .git suffix if it exists using non-greedy matching. It also validates the pathname syntax (foo/bar or foo/bar/tree/baz).