Re: help for git format-patch lost diffstat
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 25, 2022, 17:25 UTC
- Message-ID
- <xmqqo80pvzwd.fsf@gitster.g>
- In-Reply-To
- <CAPig+cQsGZ5Uw13vr5r_SZ9APZwovtxSW5N4QGpieHRx1_6zRg@mail.gmail.com>
Eric Sunshine <sunshine@sunshineco.com> writes:
Show 12 quoted lines
> The problem is that when you format both patches of a two-commit > repository, `origin` is NULL because there is no commit preceding the > initial commit; the initial commit is the root of the history. Thus, > there is nothing prior to the first patch against which to create a > diffstat. > > I have not investigated, but it may be possible to teach > show_diffstat() how to generate a diffstat against the "emptiness" > preceding the initial commit, but nobody has done so yet. Perhaps this > would be a good project for someone interested in contributing to the > project (or perhaps not -- as mentioned, I haven't investigated how > hard this would be).
Yeah, it is like the "--root" option to allow us stop treating a root commit as any special and instead consider it is adding everything it has relative to the empty tree, which sounds like a quite sensible thing to do.
Thanks.