You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.
My team has a particular setup that currently isn't supported by this plugin. For various reasons, the HEAD branch of our sourcegraph remote is not the same as the HEAD branch of our origin. On origin, we use develop, and on sourcegraph we use master. If I'm on develop and try to open a link to Sourcegraph, the plugin confirms that develop exists on origin, but not that it exists on sourcegraph.
// If on a branch that does not exist on the remote, use "master" instead.
if (!isRemoteBranch(branch, repoRoot)) {
branch = "master";
}
There are two assumptions in the above snippet that are not completely general:
The remote branch that matters may be sourcegraph instead of origin (which is hard-coded in isRemoteBranch).
The HEAD for the remote branch that matters may not be master.
A fix for (1) solves for my team's specific circumstances. A fix for (2) would make this plugin more robust, but isn't as high of a priority.
I'm not sure the best way to implement the fix for (2). If you run git remote show sourcegraph you could grep for a line that reads HEAD branch: master. Maybe there's a better approach? Alternatively, add a simple branch setting to the .idea/sourcegraph.xml config file to override the assumption of master.
The text was updated successfully, but these errors were encountered:
My team has a particular setup that currently isn't supported by this plugin. For various reasons, the HEAD branch of our
sourcegraph
remote is not the same as the HEAD branch of ourorigin
. Onorigin
, we usedevelop
, and onsourcegraph
we usemaster
. If I'm ondevelop
and try to open a link to Sourcegraph, the plugin confirms thatdevelop
exists onorigin
, but not that it exists onsourcegraph
.sourcegraph-jetbrains/src/Util.java
Lines 101 to 104 in c73b380
There are two assumptions in the above snippet that are not completely general:
The remote branch that matters may be
sourcegraph
instead oforigin
(which is hard-coded inisRemoteBranch
).The HEAD for the remote branch that matters may not be
master
.A fix for (1) solves for my team's specific circumstances. A fix for (2) would make this plugin more robust, but isn't as high of a priority.
I'm not sure the best way to implement the fix for (2). If you run
git remote show sourcegraph
you could grep for a line that readsHEAD branch: master
. Maybe there's a better approach? Alternatively, add a simplebranch
setting to the .idea/sourcegraph.xml config file to override the assumption ofmaster
.The text was updated successfully, but these errors were encountered: