git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: FanJun Kong <bh1scw@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: help for git format-patch lost diffstat
Date: Mon, 25 Apr 2022 01:14:04 -0700	[thread overview]
Message-ID: <xmqqk0bdy3zn.fsf@gitster.g> (raw)
In-Reply-To: 20220424064114.nwzldz5s2bnkrlu5@kong-HP

FanJun Kong <bh1scw@gmail.com> writes:

> First, I created two commits to a demo project.
>
> when I use command:
> git format-patch --cover-letter -1
> ...
> Then I change command to:
>
> git format-patch --cover-letter -2


Here is _one_ way I just came up with, that gives you a result
identical to what you reported, and it is a perfectly understandable
and expected outcome in _this_ scenario.

Preparation goes like this.  Go to any single-parent commit and
revert it.

  $ git checkout --detach seen^2
  $ GIT_EDITOR=: git revert HEAD

Now we have two commits.  Try formatting the topmost one:

  $ git format-patch --stdout --cover-letter -1 |
    sed -e "1,/^$/d" -e "/^-- /q"
  *** BLURB HERE ***

  Junio C Hamano (1):
    Revert "ci: call `finalize_test_case_output` a little later"

   t/test-lib.sh | 11 +++++------
   1 file changed, 5 insertions(+), 6 deletions(-)

  -- 

Now try formatting the twomost two:

  $ git format-patch --stdout --cover-letter -2 |
    sed -e "1,/^$/d" -e "/^-- /q"
  *** BLURB HERE ***

  Johannes Schindelin (1):
    ci: call `finalize_test_case_output` a little later

  Junio C Hamano (1):
    Revert "ci: call `finalize_test_case_output` a little later"


  -- 

The topmost commit had some effect on a single file, but when the
effect of two topmost commits are taken together, they cancel out.

I am not saying these two commits are what you have, but the outcome
obviously depends on what these two commits are, and if you do not
show them, nobody would be able to help you.


      parent reply	other threads:[~2022-04-25  8:15 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
2022-04-25  8:14 ` Junio C Hamano [this message]

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=xmqqk0bdy3zn.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=bh1scw@gmail.com \
    --cc=git@vger.kernel.org \
    /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).