intellij icon indicating copy to clipboard operation
intellij copied to clipboard

`git rev-parse @{u}` leads to `git diff` "hallucinations" by referring to files that are present in the upstream branch but not known to the local branch yet.

Open dkashyn-sfdc opened this issue 1 year ago • 0 comments

Description of the bug:

For this to be the case the origin branch is supposed to have changes that are not merged/rebased into the current branch.

After having the origin branch fetched but not merged/rebased into the current branch, @{u} can add files that are not known to the current branch to the Working Set.

WorkingSet should be populated by using only files that are present current branch lineage.

@{u} is worse option than @ in some scenarios...

Which category does this issue belong to?

Intellij

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

  1. Make sure that Sync->Expand sync to Working Set is checked.
  2. Change the origin branch by the addition of a new file or making any edits in any existing file, without making ANY local changes.
  3. git fetch
  4. Run Bazel sync

The file(s) that is added/modified on the remote will be considered as part of the Working Set even though it doesn't make sense in the context of the current branch.

Which Intellij IDE are you using? Please provide the specific version.

2024.2.2

What programming languages and tools are you using? Please provide specific versions.

No response

What Bazel plugin version are you using?

No response

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

No response

dkashyn-sfdc avatar Oct 30 '24 21:10 dkashyn-sfdc