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.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Line 100 of lib.rb, according to https://github.com/schacon/ruby-git/blob/5ff106ae7ed3ad3bbc757f8961104de2fb2c5e78/lib/git/lib.rb#L101
return string if string =~ /[A-Fa-f0-9]{40}/ # passing in a sha - just no-op it
But my poor string is 357b586115a9590a164f547ec539c6f5274fbc12^{commit}. So that's what comes back at me.
357b586115a9590a164f547ec539c6f5274fbc12^{commit}
The regex should start with \A and end with \Z.
\A
\Z
The text was updated successfully, but these errors were encountered:
Good catch! Anything CONTAINING a SHA-like substring will be returned untouched.
In fact, 40-hex names are permitted (really bad practice, but they may exist).
git itself will warn you if you use a 40-hex name so let's keep that return, for the sake of backwards compatibility.
return
Working on it.
Sorry, something went wrong.
33f100f
Wow. That was fast :)
You've done the hard work here :p
I've just changed \A \Z for ^ $ since it's a little more clear and mean the same on the given scenario.
^
$
No branches or pull requests
Line 100 of lib.rb, according to https://github.com/schacon/ruby-git/blob/5ff106ae7ed3ad3bbc757f8961104de2fb2c5e78/lib/git/lib.rb#L101
But my poor string is
357b586115a9590a164f547ec539c6f5274fbc12^{commit}
. So that's what comes back at me.The regex should start with
\A
and end with\Z
.The text was updated successfully, but these errors were encountered: