Repository navigation
fix: Git Pull never detects upstream changes on working branches (#195) - #196
Closed
AndriiPasternak31 wants to merge 3 commits into
Closed
AndriiPasternak31 wants to merge 3 commits into
AndriiPasternak31 wants to merge 3 commits into
Conversation
…lityai#195) Three bugs combined to make pull completely broken for template-based agents: 1. Status endpoint used `git fetch --dry-run` which never updates remote refs — replaced with `git fetch origin` 2. All pull/status/sync operations compared against origin/{working_branch} instead of origin/main — added _get_pull_branch() helper that detects trinity/* working branches and redirects pull to main 3. Manual git init destroyed remote history via force push — now preserves history with git fetch + reset, falling back to force push for empty repos Push operations correctly remain on the working branch. Closes Abilityai#195 Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Document _get_pull_branch() helper, updated line numbers, and initialize_git_in_container() history preservation. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
- git_service.py: Replace stringly-typed error check with explicit required flag on setup commands - git.py: Combine N+1 subprocess calls for multi-path git add into single call - tests: Extract shared _init_repo_with_remote() helper, add teardown to clean up temp directories Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
AndriiPasternak31
force-pushed
the
feature/195-fix-git-pull-working-branches
branch
from
March 26, 2026 23:47
f2b1d65 to
6663266
Compare
vybe
added a commit
that referenced
this pull request
Mar 28, 2026
… (#196) Three bugs combined to break git pull for template-based agents using trinity/* working branches: 1. Status endpoint used `git fetch --dry-run` (never updated remote refs) 2. Pull/status operations compared against origin/{working_branch} instead of origin/main 3. Manual git init destroyed remote history via force push Added `_get_pull_branch()` helper that detects trinity/* branches and redirects to origin/main. Fixed initialize_git_in_container() to preserve remote history via fetch+reset. Includes 9 unit tests. Co-authored-by: Andrii Pasternak <[email protected]>
Contributor
|
Merged manually to main (squash) after rebasing and dropping deprecated changelog changes. See commit 5b1555a. |
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.
Description
Fixes three independent bugs that combined to make git pull completely broken for template-based agents using trinity/* working branches. Status endpoint now performs a real fetch, pull/status/sync operations target origin/main instead of origin/{working_branch}, and manual git init preserves remote history instead of destroying it with force push.
Related Issue
Fixes #195
Type of Change
Testing
Checklist