Skip to contentSkip to conversation

Higher-level change review?

DISCUSSION Dave Abrahams 3 participants 3 messages Jun 15, 2016 2 messages not in the archive

lore
Share & tools
lore
#0 lore raw

I've been working on a fairly large Org outline and also merging upstream code changes in a project that does a lot of refactoring, and I've discovered that Git's diff format is poorly-suited to reviewing the kinds of structural modifications I often deal with, where indentation changes and large parts of documents are reorganized. Are there better ways to review, stage, etc. this kind of change than by using straight-ahead diffs? And, for the magit list, has anyone integrated an improved review capability with magit?

Hints most appreciated,

Signature · 3 lines
Dave Abrahams
BoostPro Computing
http://www.boostpro.com
#2 lore raw
In reply to a message not in the archive
Quoted 3 lines · Dave Abrahams

I've discovered that Git's diff format is poorly-suited to reviewing the kinds of structural modifications I often deal with, where indentation changes and large parts of documents are reorganized.

Something off the top of my head:

git (diff|show) -w

?

Signature · 2 lines
Cheers,
Ray Chuan
#4 lore raw
In reply to a message not in the archive

[Sending via email, not via GMane; sorry if you got duplications]

Quoted 9 lines · Tay Ray Chuan
Quoted 4 lines · Dave Abrahams

I've discovered that Git's diff format is poorly-suited to reviewing the kinds of structural modifications I often deal with, where indentation changes and large parts of documents are reorganized.

Something off the top of my head:

git (diff|show) -w

While -w, --ignore-all-space (and its lesser variant -b, --ignore-space-change) are nice and good, they cannot deal with code movement.

I have saved somewhere a shell script involving "git blame -w -C -C HEAD^.." plus some filtering to see what changed beside reordering... but I seem to have it misplaced.

Found it:

From: Junio C Hamano <[email protected]>
http://permalink.gmane.org/gmane.comp.version-control.git/174966
http://thread.gmane.org/gmane.comp.version-control.git/174954/focus=174966
JH>
JH> "git blame" tip of the day. After applying a series like this on a topic JH> branch, running
JH>
JH> $ git blame -C master.. -- gitweb/INSTALL | grep -C 3 -e '^[^^]' | less -S
JH>
JH> lets us view the lines without drowning in the bulk of lines that were JH> merely moved.

HTH

Signature · 1 line
Jakub Narębski