What it does
zm.branches
List the world's branches — git branch --list.
Each row carries the branch name, the commit its head names, and whether this session is on it. Sorted by name.
A branch is a fact about the world: it exists for everyone who can see the world, and the commit its head names is the same commit for all of them. Which branch you are ON is not — it is yours alone. So at most one row comes back marked current, and it says nothing about where anybody else is working.
Read straight off the local cache, so it costs no round-trip. Move onto one of the branches it names with zm.checkout, or start a new one with zm.branch.
zm.branches()
--> { { branch = "main", commit_id = "01M0…", current = true },
{ branch = "feature", commit_id = "01M0…", current = false } }
Discussion
Scoped to this part · feeds back into the world's score.
Sign in to post.sign in
No comments yet. Be the first.