danielpronych / diff-ignore-moved-lines

Strip moved lines from a diff

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ignore moved diff lines

Diffs often show a lot of lines which have simply been moved around, for example after running sort on a configuration file. For each line in the diff, this script will check whether that line has been added and removed the same amount of times. If so, it's simply removed from output.

Installation

make test # Optional; requires shunit2
sudo make install

Usage

diff ... | diff-ignore-moved-lines
diff-ignore-moved-lines < file.patch

About

Strip moved lines from a diff

License:GNU General Public License v3.0


Languages

Language:Shell 87.6%Language:Makefile 12.4%