总结版本之间更改的一种方法是使用diffstat。Diffstat 计算删除/添加的行数,并以图形表示所有文件的更改相对分布。来自 linux 内核源代码的示例:
$ git diff v3.5-rc3 v3.5-rc4 [k-z]* | diffstat
kernel/cgroup.c | 13 +
kernel/events/core.c | 10 -
kernel/exit.c | 19 +-
kernel/pid_namespace.c | 20 ++
kernel/printk.c | 241 ++++++++++++++++++++++++++++-----
kernel/sys.c | 6
lib/fault-inject.c | 4
mm/memblock.c | 48 +++++-
mm/memcontrol.c | 6
mm/memory.c | 12 +
mm/mempolicy.c | 2
mm/oom_kill.c | 17 +-
mm/page_cgroup.c | 4
mm/pagewalk.c | 1
mm/percpu-vm.c | 1
net/9p/trans_virtio.c | 2
net/ceph/ceph_common.c | 7
net/ceph/messenger.c | 4
net/ceph/mon_client.c | 8 +
net/ceph/osd_client.c | 12 -
scripts/get_maintainer.pl | 3
sound/pci/hda/hda_codec.c | 46 +++++-
sound/pci/hda/hda_codec.h | 2
sound/pci/hda/hda_intel.c | 2
sound/soc/codecs/wm8904.c | 26 +--
sound/soc/codecs/wm8996.c | 8 -
sound/soc/pxa/pxa-ssp.c | 38 +----
sound/soc/tegra/tegra_wm8903.c | 13 +
sound/usb/6fire/firmware.c | 2
sound/usb/pcm.c | 21 +-
tools/hv/hv_kvp_daemon.c | 10 -
tools/perf/builtin-stat.c | 8 -
tools/perf/util/header.c | 48 +++++-
tools/perf/util/include/linux/bitops.h | 2
tools/perf/util/session.c | 10 +
tools/perf/util/session.h | 1
virt/kvm/assigned-dev.c | 4
37 files changed, 510 insertions(+), 171 deletions(-)
$
在这里您可以看到,对于选定的目录,在 3.5-rc3 和 3.5-rc4 之间,大部分工作都在添加调试代码(当天真地假设添加/删除的每一行代表相同的工作量时)。