Introduction
------------
-The diff commands git-diff-index, git-diff-files, git-diff-tree, and
-git-diff-stages can be told to manipulate differences they find in
+The diff commands git-diff-index, git-diff-files, and git-diff-tree
+can be told to manipulate differences they find in
unconventional ways before showing diff(1) output. The manipulation
is collectively called "diffcore transformation". This short note
describes what they are and how to use them to produce diff outputs
- git-diff-tree compares contents of two "tree" objects;
- - git-diff-stages compares contents of blobs at two stages in an
- unmerged index file.
-
In all of these cases, the commands themselves compare
corresponding paths in the two sets of files. The result of
comparison is passed from these commands to what is internally
diffcore-pathspec: For Ignoring Files Outside Our Consideration
------------------
+---------------------------------------------------------------
The first transformation in the chain is diffcore-pathspec, and
is controlled by giving the pathname parameters to the
git-diff-* commands on the command line. The pathspec is used
to limit the world diff operates in. It removes the filepairs
-outside the specified set of pathnames. E.g. If the input set
+outside the specified set of pathnames. E.g. If the input set
of filepairs included:
------------------------------------------------
diffcore-break: For Splitting Up "Complete Rewrites"
---------------
+----------------------------------------------------
The second transformation in the chain is diffcore-break, and is
controlled by the -B option to the git-diff-* commands. This is
diffcore-rename: For Detection Renames and Copies
----------------
+-------------------------------------------------
This transformation is used to detect renames and copies, and is
controlled by the -M option (to detect renames) and the -C option
diffcore-merge-broken: For Putting "Complete Rewrites" Back Together
----------------------
+--------------------------------------------------------------------
This transformation is used to merge filepairs broken by
diffcore-break, and not transformed into rename/copy by
diffcore-pickaxe: For Detecting Addition/Deletion of Specified String
-----------------
+---------------------------------------------------------------------
This transformation is used to find filepairs that represent
changes that touch a specified string, and is controlled by the
diffcore-order: For Sorting the Output Based on Filenames
---------------
+---------------------------------------------------------
This is used to reorder the filepairs according to the user's
(or project's) taste, and is controlled by the -O option to the
*.c
t
------------------------------------------------
-