sublime_merge icon indicating copy to clipboard operation
sublime_merge copied to clipboard

Can't merge from a branch named `stash`

Open mbartlett21 opened this issue 3 years ago • 2 comments

Version info

  • OS: Windows 11
  • Build: 2077

Description

I can't merge from a branch named stash. Rebasing also doesn't work, since it also tries to rebase on a stash, not the stash branch.

Steps to reproduce

Steps to reproduce the behavior:

  1. Make a branch called stash
  2. Check out another branch
  3. Right click on the stash branch and try to merge it into the current branch.
  4. git tries to merge from a stash down in the tree rather than the stash branch. (Merge runs git merge stash)

Expected behavior

Either:

Sublime Merge merges the stash branch.

Or:

Sublime Merge doesn't let me create a branch named stash.

Screenshots

After right click -> merge image

After clicking merge image image

mbartlett21 avatar Oct 20 '22 00:10 mbartlett21

Hi @mbartlett21,

Thanks for reporting this issue - we'll be investigating this further and will keep you updated as this progresses.

Kind regards, - Dylan

dpjohnst avatar Oct 20 '22 00:10 dpjohnst

@dpjohnst I also found that git on the command line doesn't work too well with a branch named stash.

Details
> # stash pop actually doesn't work
> git stash pop 'stash@{0}'
warning: refname 'stash' is ambiguous.
warning: refname 'stash' is ambiguous.
warning: refname 'stash' is ambiguous.
warning: refname 'stash' is ambiguous.
warning: refname 'stash' is ambiguous.
warning: refname 'stash' is ambiguous.

> # these ones do actually work properly though
> git checkout stash
warning: refname 'stash' is ambiguous.
Switched to branch 'stash'

> git checkout 'stash@{0}'
warning: refname 'stash' is ambiguous.
warning: refname 'stash' is ambiguous.
Note: switching to 'stash@{0}'.

...

HEAD is now at b9e3dbb WIP on master: 15a3206 Show small round corners

mbartlett21 avatar Oct 20 '22 00:10 mbartlett21

Hi @mbartlett21,

Thanks again for reporting this!

This has been resolved in Sublime Merge build 2080 (development build).

Kind regards, - Dylan from Sublime HQ

dpjohnst avatar Dec 05 '22 23:12 dpjohnst