Hey, I have another question: is there any way to ...
# help
u
Hey, I have another question: is there any way to get the branch associated with a commit number in the Python SDK? I was hoping get_commit might have this in the response data but I haven't seen it in there
u
Hi @Conor Simmons, I'm not sure that there is, but let me verify that
u
Thanks!
u
It looks like the
parent
property would be the branch, but let me make sure
u
@Conor Simmons Sorry,
parent
is a ref to the previous commit in the log lakeFS doesn't currently support looking up a branch from a commit
u
Ok. Another workaroud I thought of would be to list all the commits under a given branch and search for the desired commit. I don't think there's a way to get this either though? Only the most recent commit?
u
log_commits
(which replaces the deprecated
log_branch_commits
) can take a branch as a ref and return it's commit log
u
I agree that it's possible to roll your own commit lookup this way
u
Thanks @Elad Lachmi that works for me!
u
Sure, np