git-branchless icon indicating copy to clipboard operation
git-branchless copied to clipboard

Bad interaction between `reset`/`checkout` and branch names that are ambiguous with file paths

Open arxanas opened this issue 1 year ago • 0 comments

Description of the bug

Had an issue something like this:

$ mkdir -p foo/bar
$ touch foo/bar/baz
$ git add foo/bar/baz
$ git checkout -b foo/bar
$ git amend

Expected behavior

Amends normally; staging area is clean afterwards.

Actual behavior

Some warning was printed due to the implicit use of git reset, and then the staging area was not clean as expected.

Version of rustc

No response

Automated bug report

No response

Version of git-branchless

git-branchless-opts 0.8.0

Version of git

2.42.0

arxanas avatar Dec 17 '23 23:12 arxanas