Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Allow git repositories to contain hyphens

  • Loading branch information...
commit ab257fe4d4be5b1057d31f9ca74975285561fffe 1 parent 1a58ebe
@edsinclair authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 bin/git-hub-commit
View
4 bin/git-hub-commit
@@ -2,8 +2,8 @@
remotes = `git remote -v`.split("\n")
remote = remotes.detect { |l| l.start_with?("origin\t") }
url = remote.split(" ")[1]
-repo = url[%r{(\w+/\w+)\.git}i, 1]
-branch = `git rev-parse --abbrev-ref HEAD`.strip
+repo = url[%r{([\w\-]+/[\w\-]+)\.git}i, 1]
+#branch = `git rev-parse --abbrev-ref HEAD`.strip
commit = ARGV.last
url_to_open = "https://github.com/#{repo}/commit/#{commit}"
Please sign in to comment.
Something went wrong with that request. Please try again.