diff: Make numstat machine fritndly also for renames
commit03494fe6edfa1a523f50c8079971f58342803882
authorJakub Narebski <jnareb@gmail.com>
Mon, 7 May 2007 13:23:54 +0000 (7 15:23 +0200)
committerJakub Narebski <jnareb@gmail.com>
Mon, 7 May 2007 13:23:54 +0000 (7 15:23 +0200)
treec2a0ecc2e8c8de59c1f61f069f538061d58b83ae
parent2a2b9bf81d9e8c92bcde5f5dcad9911ff8e6a827
diff: Make numstat machine fritndly also for renames

Make result of git-diff --numstat more suitable for machines also when
renames are involved, by using format similar to the one for renames
in the raw diff format, instead of the format more suited for humans.

The numstat format for rename is now

  added deleted TAB path for "src" TAB path for "dst" LF

or if -z option is used

  added deleted TAB path for "src" NUL NUL path for "dst" NUL

When -z option is not used, TAB, LF, and backslash characters in  pathnames
are represented as \t, \n, and \\, respectively.

Instead of saving human readable rename information in the 'name'
field when diffstat info is generated, do it when writing --stat
output.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
diff.c