Simplify GIT.IsValidRevision
We should pass --verify to tell rev-parse that we're just testing, and use the ^{commit} dereference operator to avoid the hack of removing a character from the commit hash to see if it's really in the object database. Bug: 938627 Change-Id: Ic6ea898b0a5a6a1a5d706c7586c7208ec8ca2ce2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1504104 Commit-Queue: Michael Spang <spang@chromium.org> Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Showing
Please
register
or
sign in
to comment