diffstat : diff 輸出的歷史統計
Debian package [
diffstat] 可以建構 diff 輸出的歷史統計,這對於一個採用 version control 的專案,有參考的價值。以 xorz 來說,大致的使用方式如下:
jserv@venux:~/gui-toolkits/xorz$ svn diff -r1:HEAD | diffstat
ChangeLog | 7
ChangeLog-xorz | 135 ++
GL/glx/g_disptab_EXT.c | 6
GL/glx/g_disptab_EXT.h | 9
GL/glx/g_render.c | 518 ++++----
GL/glx/g_renderswap.c | 454 +++----
GL/glx/g_single.c | 249 +++-
GL/glx/g_singleswap.c | 273 +++-
GL/glx/glxcmds.c | 17
GL/glx/glxcmdsswap.c | 4
GL/glx/glxscreens.c | 2
GL/glx/glxserver.h | 448 +++++++
GL/glx/render2.c | 60 -
GL/glx/render2swap.c | 48
GL/glx/renderpix.c | 200 +--
GL/glx/renderpixswap.c | 200 +--
GL/glx/rensizetab.c | 2
GL/glx/single2.c | 18
GL/glx/single2swap.c | 16
GL/glx/singlepix.c | 52
GL/glx/singlepixswap.c | 52
GL/glx/singlesize.c | 11
GL/glx/xfont.c | 20
GL/mesa/Makefile.am | 84 +
GL/mesa/X/xf86glx.c | 390 ++++++
Xext/shmint.h | 23
Xext/syncint.h | 77 -
configure.ac | 29
drm/drm.h | 1
fb/fbbltone.c | 2
fb/fbcompose.c | 1045 +++++++++++++----
fb/fbmmx.c | 701 ++++++++++-
fb/fbmmx.h | 19
fb/fbpict.c | 14
fb/fbpict.h | 200 ++-
hw/kdrive/src/kmode.c | 7
hw/xgl/Makefile.am | 3
hw/xgl/egl/Makefile.am | 16
hw/xgl/egl/evdev.c | 630 ++++++++++
hw/xgl/egl/kinput.c | 1683 ++++++++++++++++++++++++++++
hw/xgl/egl/kkeymap.h | 58
hw/xgl/egl/xegl.c | 799 +++++++++++++
hw/xgl/egl/xegl.h | 131 ++
hw/xgl/egl/xeglinput.c | 168 ++
hw/xgl/glx/xglx.c | 81 +
hw/xgl/xgl.h | 57
hw/xgl/xglcopy.c | 7
hw/xgl/xglget.c | 3
hw/xgl/xglglx.c | 2890 +++++++++++++++++++++++++++++++++++--------------
hw/xgl/xglglyph.c | 116 +
hw/xgl/xglinput.c | 2
hw/xgl/xglpixmap.c | 13
hw/xgl/xglscreen.c | 12
hw/xgl/xglsync.c | 14
hw/xgl/xgltrap.c | 2
include/GL/glxproto.h | 6
include/config.h.in | 3
include/picturestr.h | 133 ++
mi/miwideline.c | 4
miext/damage/damage.c | 16
render/picture.c | 492 +++++++-
xkb/ddxList.c | 92 -
xkb/ddxLoad.c | 329 +++--
63 files changed, 10490 insertions(+), 2663 deletions(-)
在 [
diffstat] 的 man page 提到:
This program reads the output of diff and displays a histogram of the nsertions, deletions, and modifications per-file. Diffstat is a program that is useful for reviewing large, complex patch files. It reads from one or more input files which contain output from diff, producing a histogram of the total lines changed for each file referenced. If the input filename ends with .bz2, .Z or .gz, diffstat will read the uncompressed data via a pipe from the corresponding program.
所以 diffstat 基本是參考 unified diff (也就是 diff -u) 的結果,統計個別與整體的 insertions(+) 與 deletions(-) 數量。
由 jserv 發表於 December 11, 2005 03:56 PM