sourcegraph / sourcegraph-public-snapshot

Code AI platform with Code Search & Cody
https://sourcegraph.com
Other
10.11k stars 1.29k forks source link

Jetbrains plugin doesn't properly handle branch lookups for non-origin remotes #42391

Open jcdavis opened 2 years ago

jcdavis commented 2 years ago

Steps to reproduce:

  1. Have a git repo where the origin remote is not the tracked sourcegraph remote
  2. Try to open a link with a branch that exists in the origin remote, but not in the tracked sourcegraph remote

Expected behavior:

The URL used by "Open Selection in Sourcegraph Web"/ "Copy Sourcegraph File Link" should work

Actual behavior:

504 gateway timeout.

The issue seems to be that GitUtil.doesRemoteBranchExist always checks against origin, even though I have a sourcegraph remote configured, which means that this passes, so it uses that branch as branch parameter in the URL instead of my configured default branch name

If would like immediate help on this, please email support@sourcegraph.com (you can still create the issue, but there are not SLAs on issues like there are for support requests).

malomarrec commented 1 year ago

Hey @malomarrec, it looks like this issue was created by someone outside Sourcegraph. Assigning you to triage it! Please answer and route to the right team by adding their team label, then remove the triage-bot/needs-triage label