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

possibility to specify custom rebase options? #66

Closed sentriz closed 1 year ago

sentriz commented 1 year ago

would it makes sense to allow custom rebase options for use with --and-rebase?

for example using the new rebase --update-refs feature of git

otherwise i need to do it manually, like

git add <files>
git absorb --base origin/master
git rebase -i --autosquash --update-refs origin/master

but maybe it could be nice to do it in 2 steps like

git add <files>
git absorb --update-refs --base origin/master # or whatever
tummychow commented 1 year ago

so the problem with this is it massively complicates the cli of git-absorb. the cli of git-rebase is sizable and complex - there are tons of options, some that are legal with each other and some that aren't, etc. we would basically have to add every single one of these options to git-absorb and i really do not want to go down that slippery slope. to me there are a few principled ways to approach this:

i would probably consider prs for any of these, but i'm not adding options from git-rebase directly into the clap args.

sentriz commented 1 year ago

thanks for the response :+1: that all makes sense to me. i think i like the sound of option 1, but you're right in that this sort of stuff shouldn't be git-absorbs responsibility. i was also just wondering did you have a nice solution to this in mind. so thanks!