News for hackers. Stuff that matters.
Re:git-appraise – Distributed Code Review for Git by IshKebab on Friday August 11, 2023 @03:50AM (#37086184)
That sounds like a great idea! Difficult to see any significant downsides. OTOH checking out a branch and doing a commit involves slightly more friction that just clicking some links. I probably wouldn't bother if I had GitHub or Gitlab set up. But if I was starting a new company and didn't have them set up yet this sounds like genius.

I guess you can do a similar thing with issues just by having a folder of markdown files for each issue and appending comments to them.

If some conventions could be agreed you could have GUI support.

Re:git-appraise – Distributed Code Review for Git by mike_hearn on Friday August 11, 2023 @04:45AM (#37086477)
It's not that hard if you use an IDE. I review work this way all the time. It involves:

1. Click the fetch icon. New work to review shows up.

2. Right click to compare the branches, take a look through the diffs.

3. If I see something I want to check, click "Checkout" in the branch selector and start making the changes, commit, push.

4. Otherwise when done, use git merge and delete the origin branch (I have some shell functions for this).

One thing I've found hard to settle on is what message to use in the merge commits. I don't insist all changes have tickets because it'd just be redundant work for the case of small cleanups, fixing bugs you spotted whilst doing other stuff. But then the default merge commit message isn't terribly helpful, and writing one that is can end up redundant.

Another problem is that the railway lines can get quite hairy if people aren't disciplined about constantly rebasing. You can of course rebase for them, but then you lose the ability to view only the merge commits to master.

Re:git-appraise – Distributed Code Review for Git by IshKebab on Friday August 11, 2023 @01:44PM (#37091551)
How do you request a review and ensure that branches are reviewed before merging?
Re:git-appraise – Distributed Code Review for Git by mike_hearn on Friday August 11, 2023 @03:14PM (#37092661)
To request a review you push the changes into a special branch namespace in the reviewer's repository. IntelliJ uses / as a way to organize branches into folders, so it's easy to see what review requests come from who. You can also inform them in other ways (CCing on a ticket, email, chat, etc).

We use a kernel model in which there is no shared repository, so it's impossible for branches to be merged without being reviewed because it's the reviewer who merges them when they're satisfied.

Re:git-appraise – Distributed Code Review for Git by IshKebab on Friday August 11, 2023 @03:40PM (#37093039)
How do you push changes to someone's repo? I think the kernel guys use email right? Sounds a bit painful.
Re:git-appraise – Distributed Code Review for Git by mike_hearn on Saturday August 12, 2023 @05:20AM (#37098440)
git push. We use Gitolite which is a git server setup that can be made to enforce access control rules based on branch names.

https://gitolite.com/gitolite/index.html