From 9cbd9ad2204e4b63315cee5b482ba314a9d46e8a Mon Sep 17 00:00:00 2001 From: Lee Packham Date: Sat, 20 Nov 2010 23:11:27 +0000 Subject: Make the regex for URL checking more git friendly * Urls for Git Commits need to be between 4-40 not 40. For example: https://github.com/mxcl/homebrew/commit/805a https://github.com/mxcl/homebrew/commit/805 Signed-off-by: Mike McQuaid --- Library/Contributions/examples/brew-pull.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Library') diff --git a/Library/Contributions/examples/brew-pull.rb b/Library/Contributions/examples/brew-pull.rb index 38ed73b39..2eccdd0d6 100755 --- a/Library/Contributions/examples/brew-pull.rb +++ b/Library/Contributions/examples/brew-pull.rb @@ -16,7 +16,7 @@ end HOMEBREW_REPOSITORY.cd do ARGV.each do|arg| # This regex should work, if it's too precise, feel free to fix it. - if !arg.match 'https:\/\/github.com\/\w+\/homebrew\/(pull\/\d+|commit\/\w{40})' + if !arg.match 'https:\/\/github.com\/\w+\/homebrew\/(pull\/\d+|commit\/\w{4,40})' ohai 'Ignoring URL:', "Not a GitHub pull request or commit: #{arg}" next end -- cgit v1.2.3