git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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 <gitster@pobox.com>
Date
Mar 8, 2016, 17:40 UTC
Message-ID
<xmqqoaaolvfl.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<CACBZZX7o+VA1RVvja3xtBQf+rr2bWoByas4D5GKZ_VfQr7H19w@mail.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 17 quoted lines
> 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.

Previous: Ævar Arnfjörð BjarmasonNext: Jeff King
Message 2 of 4 in “Is there a --stat or --numstat like option that'll allow me to have my cake and eat it too?”
  1. Ævar Arnfjörð BjarmasonMar 8, 2016
  2. Junio C HamanoMar 8, 2016
  3. Jeff KingMar 8, 2016
  4. Ævar Arnfjörð BjarmasonMar 8, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.