Re: Is there a --stat or --numstat like option that'll allow me to have my cake and eat it too?
From: Junio C Hamano <hidden>
Date: 2016-06-15 23:08:39
Ævar Arnfjörð Bjarmason [off-list ref] writes:
What I really want is something for git-log more like
git-for-each-ref, so I could emit the following info for each file
being modified delimited by some binary marker:
- file name before
- file name after
- is rename?
- is binary?
- size in bytes before
- size it bytes after
- removed lines
- added lines
I think no combination of git-log options or any built-in machinery
comes close to giving me all of that without having to do multiple
passes with some combination of git-log and git-show, but I'd love to
be proven wrong.I do not think such a thing exists. From the look of the above list, if I were implementing it, I'd think it would be the easiest if it is built as a new output format of "diff" that sits next to existing --stat, --patch, and --numstat formats, i.e. you would be writing a new aevars_stat_consume() callback function and calling xdi_diff_outf() like everybody else. A possible output format may look as if we are showing "log --patch" output with a bit more extended diff header lines (e.g. in addition to "rename from", etc., you would have "bytes before" and other new types of headers), but without the actual patch text.