> For a large change, I don’t want to do a “diff review”, I want to do a proper code review of a codebase at a particular instant in time, paying specific attention to the recently changed areas, obviously every team and ticket is different, but IMO unless the person doing the review is some sort of principal engineer mostly responsible for the code at large, this does not align with I would personally consider a cod…
Unified versus Split Diff
121–130 of 184 posts
Re: Unified versus Split Diff
#122E.g. that script that squashes the PR commits together - why would anyone need this, what is wrong with diffing the PR branch and the target branch, using any tool you want?
What forces you to look at the commit history?
I'm perfectly fine with the git CLI and IntellJ for local review work, and Gitlab web UI for the communicative part of a code review.
Only thing I agree with is, I (sometimes) hate the three-way unified diff in IntelliJ for merge/rebase conflicts. Other times (harmless conflicts), I love it over using the CLI.
Personally, I found the example for the desired diff format confusing.
I prefer split to unified diffs though.
Re: Unified versus Split Diff
#123This is an huge issue for us in a very big and complex codebase with a lot of engineers working on it. Code review is hard because the diff always looks reasonable, the tests always pass and all the basic stuff are always checked. However, it happens often that, even if the changes looks reasonable they are wrong. The whole architecture may drift after one bad change that looks reasonable. As always this is not stric…
Re: Unified versus Split Diff
#124Earlier quoted context omitted.
Git doesn't store diffs on logical level. Git operates on snapshots of trees. Commit is not "a collection of changes", it's a snapshot of a tree with attached predecessor of it. Then the another layer (which can be git, but also can be any other tool, adding custom diff tool to git is very easy) uses that to generate diffs. There is zero stopping anyone from adding contextual diffs to Git. Just ask it for content of…
Interesting. Wonder if something like that can be used to make git cleverer about merges for example.
Re: Unified versus Split Diff
#125Re: Unified versus Split Diff
#126I feel like I used to use a tool called Beyond Compare that presented _many_ different views of a diff (and even supported N-way diffs) back around 2012.
Re: Unified versus Split Diff
#127I feel like I used to use a tool called Beyond Compare that presented _many_ different views of a diff (and even supported N-way diffs) back around 2012.
It's still around, and still very useful for all kinds of comparisons when you need a UI https://www.scootersoftware.com/
Yet it still feels fresh and there is no competing product that can challenge them. Most other diff tools lack good merge capabilities and are subpar in multitude of other ways.
Re: Unified versus Split Diff
#128IntelliJ does this very good. On the margin to your left you can see the age of each line. Recent changes - the one you are reviewing - will be be bright white, while older proven code more faded. All inside the already powerful editor you need to navigate bigger pieces of code.
Except that will not show you removed lines. Forget it, just use the diff feature.
Re: Unified versus Split Diff
#129The author complains that he doesn't see all of the code, but in the first image it looks like the right-hand pane shows exactly that (though with diff highlighting). Am I missing something?
Re: Unified versus Split Diff
#130A third (fourth?) option worth mentioning here is difftastic[0], which uses "structural" diffing (as opposed to line diffing) for more granular diff highlighting. [0] https://github.com/Wilfred/difftastic
only side-by-side view, unfortunate for my unified view taste