Skip to content

Unexpected reordering of fixup commit in interactive rebase #2303

@gotoh

Description

@gotoh

Auto reordering feature #588 is introduced in e6ba053.
It works fine, except same / similar subject is in target commits.

These commits:

fix: some modification
enh: add great feature again
enh: add great feature
fix: my mod

I make fixup commit against "enh: add great feature"
New commits are like hits:

fixup! enh: add great feature
fix: some modification
enh: add great feature again
enh: add great feature
fix: my mod

When do interactive rebase on "fix: my mod",
SourceGit show like this:

[pick] fix: some modification
[fixup] fixup! enh: add great feature
[pick] enh: add great feature again
[pick] enh: add great feature

It is not expected order.
I expect

[pick] fix: some modification
[pick] enh: add great feature again
[fixup] fixup! enh: add great feature
[pick] enh: add great feature

That's because using StartsWith()

if (subject.StartsWith(o.Key, StringComparison.Ordinal))

Is it intended?

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions