Get the branches each commit is on
Open
customer issue
enhancement
system tables
version control
- Dominant language
- Go
- Stars
- 24.4k
- Forks
- 873
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 108
Description
A customer asked for a system table to list the branches each commit is on. You can do this with a recursive common table expression:
```
with recursive branch_commits (branch, commit) as (
select name, hash from dolt_branches
union
select branch, parent_hash
from dolt_commit_ancestors
join branch_commits
on commit = commit_hash
where parent_hash is not NULL
)
select * from branch_commits;
```
We should consider making this it's own system table, something like `dolt_commit_branches`.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.