We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d4c4a6a commit 33f100fCopy full SHA for 33f100f
lib/git/lib.rb
@@ -98,7 +98,7 @@ def full_log_commits(opts={})
98
end
99
100
def revparse(string)
101
- return string if string =~ /[A-Fa-f0-9]{40}/ # passing in a sha - just no-op it
+ return string if string =~ /^[A-Fa-f0-9]{40}$/ # passing in a sha - just no-op it
102
rev = ['head', 'remotes', 'tags'].map do |d|
103
File.join(@git_dir, 'refs', d, string)
104
end.find do |path|
0 commit comments