arxanas / git-branchless

High-velocity, monorepo-scale workflow for Git
Apache License 2.0
3.38k stars 80 forks source link

`git record -i` doesn't work after `git add -N` #1247

Open JaniM opened 4 months ago

JaniM commented 4 months ago

Description of the bug

I often want to stage a part of a new file when reconstructing commits. git record -i doesn't recognize untracked files, but it also doesn't launch if I have added, but not staged, a file.

> echo foo > foo
> git add -N foo
> git record -i
Cannot select changes interactively while there are already staged changes.
Either commit or unstage your changes and try again. Aborting.

Expected behavior

The record TUI should launch and show the added file.

Actual behavior

The TUI doesn't launch.

Version of rustc

No response

Automated bug report

No response

Version of git-branchless

git-branchless-opts 0.8.0

Version of git

git version 2.43.1

claytonrcarter commented 4 months ago

Thanks for the report. I think that git amend has a related issue being tracked in #356

arxanas commented 4 months ago

@JaniM if you want to fix it, there are details in the issue @claytonrcarter linked.

JaniM commented 4 months ago

That could be fun. I'll give it a spin.