Skip to content
This repository has been archived by the owner on Mar 10, 2022. It is now read-only.

Fix: Fallback to upstream branch name when remote does not match branch #163

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

casassg
Copy link

@casassg casassg commented Apr 5, 2021

Followup from testing #162.

Normally when there's a mismatch between upstreamAndBranch and branch it's better to use the branch name in upstreamAndBranch. When using branch, it may be that branch is not existing in remote and therefore not accessible by SourceGraph (it returns 500 when that's the case). In that sense, it's better to fallback to the branch name included in upstreamAndBranch as that usually points to a branch that does exist upstream.

@casassg casassg force-pushed the gcasassaez/fix-upstream-mismatch branch from acaf96a to 9b8f688 Compare April 5, 2021 22:11
@alexschneider
Copy link
Contributor

I realized shortly after the extension updated that I ran into the same issue as @casassg in cases where I haven't pushed my branch to upstream (in my testing I did it with a branch that was pushed, but where upstream returned origin/master, hence the confusion). Thanks for fixing it - looks good to me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants