Closed jameskyle closed 10 months ago
Happens for me as well
➜ infra-core git:(feature/kirilne/create_utils) ✗ cat .spr.yml
requireChecks: false
requireApproval: false
githubRemote: origin
githubBranch: master
➜ infra-core git:(feature/kirilne/create_utils) ✗ git spr update --detail
error: unable to fetch remote branch info, using defaults> git rev-parse --show-toplevel
> git fetch
> git rebase origin/main --autostash
git error: fatal: invalid upstream 'origin/main'
+1 origin/master is not being detected. Could we re-add the option to override automated behavior via the config?
@ConnorSinnott I believe the reintroduction of githubBranch was supposed to reintroduce that feature.
So I think the current behavior is a bug.
@ejoffe any thoughts on this one?
Sorry, I was away for a bit. In v0.14.1 the method of getting remote branch was changed to be fetched from the git upstream branch. The advantage of this approach is that you can now have stacks targeted at different remote branches, and example use case we have is different environments like a staging or feature branch. This however unfortunately was not backwards compatible and broke older configs. This should be fixed in v0.14.2 now. Both the Repo config yaml and upstream is used for this configuration. If git upstream configuration is set for the branch, it will take precedence over the Repo config.
@ejoffe thanks for the fix! out of curiosity -- how would one configure the remote branch properly before this fix? it didn't work for me on a fresh git clone where I created a branch from master with git switch -c
Set the upstream of the branch:
git branch -u origin/master
This still works in v0.14.2.
So you can actually have different upstreams set per branch, not just one for the whole repo.
I'll give the upstream a shot. Seems reasonable. Thanks for the work and explanation!
I'm still seeing this issue, though it no longer overwrites the config.