git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: FanJun Kong <bh1scw@gmail.com>, Git List <git@vger.kernel.org>
Subject: Re: help for git format-patch lost diffstat
Date: Mon, 25 Apr 2022 10:25:22 -0700	[thread overview]
Message-ID: <xmqqo80pvzwd.fsf@gitster.g> (raw)
In-Reply-To: <CAPig+cQsGZ5Uw13vr5r_SZ9APZwovtxSW5N4QGpieHRx1_6zRg@mail.gmail.com> (Eric Sunshine's message of "Mon, 25 Apr 2022 04:09:00 -0400")

Eric Sunshine <sunshine@sunshineco.com> writes:

> 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.

  parent reply	other threads:[~2022-04-25 17:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-24  6:41 help for git format-patch lost diffstat FanJun Kong
2022-04-24  6:47 ` FanJun Kong
2022-04-25  8:09 ` Eric Sunshine
2022-04-25  9:45   ` FanJun Kong
2022-04-25 17:25   ` Junio C Hamano [this message]
2022-04-25  8:14 ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqo80pvzwd.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=bh1scw@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=sunshine@sunshineco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).