File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -410,6 +410,26 @@ Code reviews
410410 saves time explaining the change or applying it; see also
411411 https://forum.nim-lang.org/t/4317
412412
413+ 2. When reviewing large diffs that may involve code moving around, github's interface
414+ doesn't help much as it doesn't highlight moves. Instead you can use something
415+ like this, see visual results `here <https://github.com/nim-lang/Nim/pull/10431#issuecomment-456968196 >`_:
416+
417+ .. code-block :: sh
418+
419+ git fetch origin pull/10431/head && git checkout FETCH_HEAD
420+ git show --color-moved-ws=allow-indentation-change --color-moved=blocks HEAD^
421+
422+ 3. In addition, you can view github-like diffs locally to identify what was changed
423+ within a code block using `diff-highlight ` or `diff-so-fancy `, eg:
424+
425+ .. code-block :: sh
426+
427+ # put this in ~/.gitconfig:
428+ [core]
429+ pager = " diff-so-fancy | less -R" # or: use: `diff-highlight`
430+
431+
432+
413433 .. include :: docstyle.rst
414434
415435
You can’t perform that action at this time.
0 commit comments