Skip to content

Include active branch name to metadata.json#73

Merged
gtrrz-victor merged 2 commits intomainfrom
soph/add-branch-to-metadata
Jan 20, 2026
Merged

Include active branch name to metadata.json#73
gtrrz-victor merged 2 commits intomainfrom
soph/add-branch-to-metadata

Conversation

@Soph
Copy link
Collaborator

@Soph Soph commented Jan 20, 2026

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.

Entire-Checkpoint: 3aa278c851a7
@Soph Soph requested a review from a team as a code owner January 20, 2026 20:11
Copilot AI review requested due to automatic review settings January 20, 2026 20:11
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Branch field to CommittedMetadata struct and WriteCommittedOptions struct 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 gtrrz-victor merged commit 4f93587 into main Jan 20, 2026
3 checks passed
@gtrrz-victor gtrrz-victor deleted the soph/add-branch-to-metadata branch January 20, 2026 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants