when use diffStat
or git diff
to analyze the code,it often shows the result below,
71 files changed, 10938 insertions(+), 947 deletions(-), 3103 modifications(!), 3027 unchanged lines(=)
but I do not know what the insertions and deletions
mean?
does it mean the increased or deleted line count?
How those insertions/deletion numbers are calculated ?
You can see that message printed in diff.c#print_stat_summary()
Those numbers are computed in diff.c#show_stats()
, where the numbers of lines added or deleted are tallied.
The actual computation for a given place is in diff.c#builtin_diffstat
(which calls diff.c#diff_populate_filespec()
if one of the files is a binary).