News for hackers. Stuff that matters.
Re:Correct Git commits with git-autofixup by quesera on Thursday March 18, 2021 @11:07AM (#26503459)
Coming from the other direction, I am very familiar with interactive rebase, and I use it on my working branch all the time before pushing.

I am struggling to understand the use case for autofixup and absorb. The descriptions talk about post-code-review changes, which means the branch has been pushed. So are these tools only for a flow that uses force-pushing regularly?

I don't think that would be a feature for my teams. We think of code review as an event in time, and changes post-code review should be clearly differentiated from changes pre-code review.

Am I missing the point?

Re:Correct Git commits with git-autofixup by Vinnl on Thursday March 18, 2021 @11:18AM (#26503559)
I generally use autosquash when a code review of a PR turns up things I missed, which should have been part of a particular commit on that PR's branch. However, I don't want to amend the previous commit right away if I'd like another review for the new changes. Thus, I do a `git commit --fixup <HEAD|hash>` and push it. I can then ask the review to only look at the new commit, I won't break their local checkouts of the branch, and only when everything's been approved I run `git rebase --autosquash` and then merge it in.

(Before I started using autosquash for this, I'd do the same, except I had to figure out at the time of merging onto which commit every new commit had to be fixed up, rather than at the time of writing it.)

Re:Correct Git commits with git-autofixup by smaddox on Thursday March 18, 2021 @08:05PM (#26508925)
Thanks for the tip!
Re:Correct Git commits with git-autofixup by vlovich123 on Thursday March 18, 2021 @11:31AM (#26503690)
I rely on code review tools that can show me the difference between two patch sets. I really love Phabricator for that ability - push a set of commits and each gets a review. Absorb any fixes, push and suddenly each commit has a new version that you can diff against old ones if you care. It makes reviewing the patch set in totality trickier. However, since I’m practice you want individual commits within a set to be standalone ones, I’ve rarely missed the ability.
Re:Correct Git commits with git-autofixup by piotrkaminski on Friday March 19, 2021 @08:20AM (#26512412)
<plug>In https://reviweable.io, you can have both matching-commit diffs and whole-PR diffs, all in the same review.</plug>
Re:Correct Git commits with git-autofixup by quesera on Monday March 22, 2021 @02:18PM (#26544587)
I think you typo'ed your plugged domain name. :)
Re:Correct Git commits with git-autofixup by piotrkaminski on Monday March 22, 2021 @02:40PM (#26544929)
Dammit! I mean, uh, it was a clever marketing ploy to attract attention and you totally fell for it. Yeah, that's the ticket.