News for hackers. Stuff that matters.
Re:git-appraise – Distributed Code Review for Git by palata on Friday August 11, 2023 @04:25AM (#37086360)
Have you ever tried the git e-mail workflow? I think you may like it, I'd be curious to have your opinion about how it compares to your workflow above :-).

The idea is that you just send your patch by e-mail, and the reviewer just applies it with `git am <the patch>`. So you don't even have to sync on a branch. Then the reviewer can comment directly on the patch. You answer with new versions of the patch, and get new reviews. It's minimal, actually decentralized (unlike, say, GitHub), and I believe it has the advantages of your workflow above.

Nice posts about it:

https://drewdevault.com/2018/07/02/Email-driven-git.html

https://drewdevault.com/2022/07/25/Code-review-with-aerc.htm...

Re:git-appraise – Distributed Code Review for Git by palata on Friday August 11, 2023 @04:44AM (#37086470)
I'd love to know why I have been downvoted on that...
Re:git-appraise – Distributed Code Review for Git by wordpad25 on Friday August 11, 2023 @05:04AM (#37086604)
the answer is in one of the first lines in your linked article "Email isn’t as sexy as GitHub"
Re:git-appraise – Distributed Code Review for Git by jauco on Friday August 11, 2023 @05:11AM (#37086642)
You know, I never really tried that. But I will do so when the opportunity arrives!
Re:git-appraise – Distributed Code Review for Git by palata on Friday August 11, 2023 @05:28AM (#37086740)
It is really easier than it looks! Took me a while to try it, but then I realized it's really super easy: run the git command to create the e-mail, send the e-mail, and on the reviewer side just run the command to apply it.

This is a nice tutorial, too, but I would recommend reading Drew Devault's posts first (and watching his short videos):

https://git-send-email.io/

Re:git-appraise – Distributed Code Review for Git by worldsayshi on Friday August 11, 2023 @05:17AM (#37086679)
Don't you lose a bit of important information when you create a patch? Like which commit it started from.
Re:git-appraise – Distributed Code Review for Git by palata on Friday August 11, 2023 @05:26AM (#37086726)
You don't send a diff, you send an e-mail formatted by git. So you get all the commits you put in it, it's really just like seeing the commits in a GitHub PR.

So the reviewer receives the commits, with their descriptions, authors, everything. Just like pulling a branch, really.

Re:git-appraise – Distributed Code Review for Git by goku12 on Friday August 11, 2023 @07:09AM (#37087324)
You do lose the information about where to apply the patch. This isn't a big problem for rebase-friendly crowd. But people who prefer the merge strategy strictly may not like it.
Re:git-appraise – Distributed Code Review for Git by Corsome on Friday August 11, 2023 @09:30AM (#37088497)
AFAICS there's `--base=auto` which captures explicit parent's sha in the patch text output (there's also a git config option to do that automatically).

Source: https://git-scm.com/docs/git-format-patch#_base_tree_informa...

Re:git-appraise – Distributed Code Review for Git by goku12 on Friday August 11, 2023 @10:26AM (#37089053)
Thank you for the information! This is the first time I'm hearing about it. Would you happen to know how this information is used? Is it just for the maintainer, or is there a tool that can use it? (I couldn't find any other reference)
Re:git-appraise – Distributed Code Review for Git by Corsome on Friday August 11, 2023 @10:52AM (#37089327)
Last time I checked it was only for maintainers convenience but the idea of using it by some tooling was already being discussed: https://people.kernel.org/monsieuricon/all-patches-must-incl...
Re:git-appraise – Distributed Code Review for Git by sirsuki on Friday August 11, 2023 @06:09AM (#37086966)
I have been giving this one a lot of thought. I jumped to sourcehut for my personal projects and was amazed how viscerally pleasing a [PATCH] email thread could be. I am convinced there is a big psychological difference between discussions via Pull Requests and discussions via email/mailing lists. I can’t pin point it but it is almost palpable.

A question I have with the process is: can email based workflow still work with for a continuous integration/delivery pipeline?

Re:git-appraise – Distributed Code Review for Git by goku12 on Friday August 11, 2023 @07:06AM (#37087301)
> A question I have with the process is: can email based workflow still work with for a continuous integration/delivery pipeline?

Doesn't sourcehut already support that? (https://man.sr.ht/builds.sr.ht/)

Re:git-appraise – Distributed Code Review for Git by palata on Friday August 11, 2023 @07:06AM (#37087304)
> I jumped to sourcehut for my personal projects

Same :-). I also love how people don't have to create an account to send a patch. They just need to send me an e-mail. That is not a problem on GitHub (because everybody is forced to have an account there), but it is if you want to host your repo somewhere else.

> can email based workflow still work with for a continuous integration/delivery pipeline?

SourceHut has a CI feature integrated with the mailing-lists: https://man.sr.ht/builds.sr.ht/

Re:git-appraise – Distributed Code Review for Git by xvilka on Friday August 11, 2023 @08:09AM (#37087762)
The biggest drawback is the inability to use on a computer without email setup, e.g. not from the main computer, or from mobile devices - smartphone, tablet. In my case it's not uncommon to do a quick review of some PRs using this Web-based workflow. Now with newer GitHub application it's even easier.
Re:git-appraise – Distributed Code Review for Git by palata on Friday August 11, 2023 @01:26PM (#37091299)
I am not sure I follow this. If you can login to GitHub from your device, why couldn't you log into your e-mail?
Re:git-appraise – Distributed Code Review for Git by xvilka on Friday August 11, 2023 @09:48PM (#37096165)
The email-based workflow often requires quite specific email setup, many mobile-friendly email apps would break the formatting, etc, like Gmail.
Re:git-appraise – Distributed Code Review for Git by darau1 on Friday August 11, 2023 @10:00AM (#37088761)
It always amazes me that these large companies insist on reinventing the wheel.
Re:git-appraise – Distributed Code Review for Git by palata on Friday August 11, 2023 @10:56AM (#37089407)
Because their wheel comes with lock-in :-)