tummychow / git-absorb

git commit --fixup, but automatic
https://crates.io/crates/git-absorb
BSD 3-Clause "New" or "Revised" License
3.35k stars 59 forks source link

Add feature to generate one fixup per commit. #91

Closed rbartlensky closed 1 year ago

rbartlensky commented 1 year ago

This is my attempt at implementing the feature request from #19.

I would suggest reviewing the changeset commit by commit, since I made sure to split the work into logical chunks: refactor, add feature, tests, and so on.

Closes issue #19.

tummychow commented 1 year ago

oh and also, the new test is failing so you'll have to figure out what's going on there. looks like something trivial related to the new repo having no configured user

rbartlensky commented 1 year ago

@tummychow I squashed away the commits to clean the history up a bit. I think I will follow-up with improving the tests since it's taking longer than I expected

rbartlensky commented 1 year ago

Also thank you for the quick turnaround!

tummychow commented 1 year ago

no problem, thanks for implementing all the requested changes. will probably cut a release for this later in the week

nickolay commented 1 year ago

Thanks for implementing this feature! Any reason the new -F mode is not the default?

rbartlensky commented 1 year ago

Any reason the new -F mode is not the default?

There's an explanation in the first commit message:

In order to not break the workflow of others, we choose to make this an option rather than the default. Moreover, folks can alias git-absorb="git-absorb --one-fixup-per-commit" if they wish to always use this option, and not have to type it out.

I will let @tummychow decide whether it should become the default in a later release or not.

tummychow commented 1 year ago

yeah i want to let it bake for a while, given the amount of code getting moved around. i would accept a pr to add a git config option for it though