lookout icon indicating copy to clipboard operation
lookout copied to clipboard

lookout-sdk doesn't support short sha1 in from/to arguments

Open smacker opened this issue 7 years ago • 5 comments

sdk review ipv4://127.0.0.1:2022 --from 9c3b4a2
[2018-11-28T12:59:58.820488+01:00]  INFO resolving to/from references app=lookout-sdk
base revision '9c3b4a2' error: reference not found

but

sdk review ipv4://127.0.0.1:2022 --from 9c3b4a28bd59526cc50164b467e75ceced403fc3

work fine

smacker avatar Nov 28 '18 12:11 smacker

Currently go-git doesn't support short hashes.

smacker avatar Nov 29 '18 15:11 smacker

why don't we just change the error message? to something like: short sha1 reference is not supported, please use the full 40 characters

carlosms avatar Apr 04 '19 11:04 carlosms

because it's convenient to support short sha1s.

git log --oneline
/find commit from which we want to test
<copy-past to --from and run>
base revision '9c3b4a2' error: reference not found

smacker avatar Apr 04 '19 12:04 smacker

I think we all agree it's convenient and it would be nice to support it if possible.

But given that this depends on support from go-git, and it's been stuck for months, I propose to change the error message to clarify that you need to use the full sha1. Then my question is if that's good enough to close this issue, or if that's a temporary workaround and we should keep this issue open.

carlosms avatar Apr 04 '19 13:04 carlosms

It makes sense to improve error message disregard of this issue

smacker avatar Apr 04 '19 14:04 smacker