Re: help for git format-patch lost diffstat

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



FanJun Kong <bh1scw@xxxxxxxxx> 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.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux