Skip to content

GraphQL - abbreviatedOid vs git 'abbreviated commit hash' #24438

Discussion options

You must be logged in to vote

Thanks for the illustrative example!

I’m not sure they can be aligned. First, the short version of the hash can be different depending on which version of git you’re using, so we can’t always guarantee that the hash we’re going to return will always match up with whatever version of git you’re using locally. Second, even if we pin to a “known good” version of git, guaranteeing that they always aligned would essentially necessitate that we generate that abbreviatedOid by a git call (or git library call … but same difference really) for every commit on every call to a query like that. Generating an O(n) overhead like that is a quick way to kill a database 😀

However, given that git repositor…

Replies: 5 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants