#Is it possible to checkout the source for a specific SHA?
1 messages · Page 1 of 1 (latest)
Hi @tiny sorrel , yes that is possible, I believe there is an optional "ref" option to Git
Oh nevermind. Perhaps it is encoded in the url now? cc @opal palm
I guess what you are looking for is something like:
client.Git(repoUrl).Commit(repoSha).Tree()
That would feel more natural
As a workaround -- You can actually pass the commit inside Branch
client.Git(repoURL).Branch(commit).Tree()
Ah I see. Thank you so much for the prompt answer! And one minor suggestion - could you document this behavior (workaround) in the SDK doc?
Added to my list, for today 😇🙏
🙏
For sure! /cc @opal palm @vital wraith
Should we have an explicit commit selector? This is a bit weird because Branch, Tag and Commit all do the same thing
Tangentially: there's no way NOT to use a selector (let it pick up the default branch), I think @scarlet bridge reported the same limitation (or was it someone else?)
I did!
Would it make any sense to rename Branch to Ref? Or is the terminology mapping to what buildkit calls it?
@scarlet bridge that's been suggested before, I also added a short explanation as to why I prefer specific terms rather than "ref"
Makes sense!
Making a PR now 🙂