News for hackers. Stuff that matters.
Re:git-appraise – Distributed Code Review for Git by d4rkp4ttern on Friday August 11, 2023 @07:25AM (#37087423)
Along the same lines: when I want to locally review someone’s PR, I want to see their changes as “dirty” relative to main, so that the changes show up nicely highlighted in PyCharm in the “gutter” (left side). This has to be such a common need, but I am surprised that I have to do convoluted things like: create a new branch, switch to it, and then:

git merge --no-commit --no-ff pr-branch

Am I missing an easier workflow/command to achieve the above? (Granted this is not so bad, and was suggested by GPT4, but I wondered if there might be a more straightforward way)

Re:git-appraise – Distributed Code Review for Git by xvilka on Friday August 11, 2023 @08:11AM (#37087777)
I recommend trying b4[1] tool.

[1] https://b4.docs.kernel.org/en/latest/index.html

Re:git-appraise – Distributed Code Review for Git by foundart on Friday August 11, 2023 @09:45AM (#37088619)
Here's a script I use for this. It's designed for use with github. Run it in your copy of a repo with a PR number and it will create a 'review' branch that has the changes uncommitted. Works great with IDEs with a good diff experience.

https://github.com/whenceforth/local-code-review

Re:git-appraise – Distributed Code Review for Git by jauco on Saturday August 12, 2023 @02:15AM (#37097506)
In vs code you check out the pr branch and then do cmd-shift-p “show differences with” and then select “main”
Re:git-appraise – Distributed Code Review for Git by d4rkp4ttern on Saturday August 12, 2023 @07:00AM (#37098917)
I don’t use vscode, but does this show the diffs in the gutter within the IDE ? Or does it simply display the diffs in a separate pane?