Include active branch name to metadata.json#73
Merged
gtrrz-victor merged 2 commits intomainfrom Jan 20, 2026
Merged
Conversation
Entire-Checkpoint: 3aa278c851a7
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request adds branch name tracking to checkpoint metadata by capturing the active branch name when checkpoints are created. As noted in the description, the branch name provides a useful hint about which branches are active or where commits could be found, although it may not always be 100% accurate if commits are made on one branch and then moved to another.
Changes:
- Added a
Branchfield toCommittedMetadatastruct andWriteCommittedOptionsstruct to capture the branch name - Implemented branch name extraction logic in three checkpoint creation locations (manual commit strategy and two auto-commit strategy methods)
- Added comprehensive test coverage for both branch and detached HEAD scenarios
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| cmd/entire/cli/checkpoint/checkpoint.go | Added Branch field to WriteCommittedOptions and CommittedMetadata structs with appropriate documentation |
| cmd/entire/cli/checkpoint/committed.go | Updated metadata writing logic to include the new Branch field |
| cmd/entire/cli/checkpoint/checkpoint_test.go | Added comprehensive tests verifying branch field capture for both branch and detached HEAD states |
| cmd/entire/cli/strategy/manual_commit_condensation.go | Added branch name extraction logic when condensing manual commit sessions |
| cmd/entire/cli/strategy/auto_commit.go | Added branch name extraction logic in two methods for committing metadata (regular and task checkpoints) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Entire-Checkpoint: fb5d49782368
gtrrz-victor
approved these changes
Jan 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is not 100% correct (might commit on main, and then move to branch) but it gives some useful hint which branches are active or were a commit could be found.