Re: [PATCH v2] diff: add --compact-summary option to complement --stat

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

 



On Fri, Jan 19, 2018 at 4:23 AM, Ævar Arnfjörð Bjarmason
<avarab@xxxxxxxxx> wrote:
> Wait, isn't there a bug here in the existing --summary code, its
> documentation says it'll show information "such as creations, renames
> and mode changes".
>
> But even though your --compact-summary shows that the file is being
> added and its mode changed:
>
>     $ diff -ru <(./git-show --stat 0433d533f1) <(./git-show --stat --compact-summary 0433d533f1)
>     --- /dev/fd/63  2018-01-18 21:11:51.186570555 +0000
>     +++ /dev/fd/62  2018-01-18 21:11:51.186570555 +0000
>     @@ -14,8 +14,8 @@
>            t: add tests for pull --verify-signatures
>            merge: add config option for verifySignatures
>
>     - Documentation/merge-config.txt     |  4 ++
>     - builtin/merge.c                    |  2 +
>     - t/t5573-pull-verify-signatures.sh  | 81 ++++++++++++++++++++++++++++++++++++++
>     - t/t7612-merge-verify-signatures.sh | 45 +++++++++++++++++++++
>     +     Documentation/merge-config.txt     |  4 ++
>     +     builtin/merge.c                    |  2 +
>     + A+x t/t5573-pull-verify-signatures.sh  | 81 ++++++++++++++++++++++++++++++++++
>     +     t/t7612-merge-verify-signatures.sh | 45 +++++++++++++++++++
>       4 files changed, 132 insertions(+)
>
> There is no difference between --stat with and without --summary on the
> same commit, shouldn't it show "create mode [...]" ?
>
> E.g. 95450bbbaa will do the trick for both:
>
>     $ diff -ru <(./git-show --stat 95450bbbaa) <(./git-show --stat --summary 95450bbbaa)
>     --- /dev/fd/63  2018-01-18 21:14:20.770050599 +0000
>     +++ /dev/fd/62  2018-01-18 21:14:20.770050599 +0000
>     @@ -14,3 +14,4 @@
>       git-svn.perl                    |  1 +
>       t/t9169-git-svn-dcommit-crlf.sh | 27 +++++++++++++++++++++++++++
>       2 files changed, 28 insertions(+)
>     + create mode 100755 t/t9169-git-svn-dcommit-crlf.sh
>
>     $ diff -ru <(./git-show --stat --summary 95450bbbaa) <(./git-show --stat --compact-summary 95450bbbaa)
>     --- /dev/fd/63  2018-01-18 21:14:30.646016210 +0000
>     +++ /dev/fd/62  2018-01-18 21:14:30.646016210 +0000
>     @@ -11,7 +11,6 @@
>          Reported-by: Brian Bennett <Brian.Bennett@xxxxxxxxxxxxxxxx>
>          Signed-off-by: Eric Wong <e@xxxxxxxxx>
>
>     - git-svn.perl                    |  1 +
>     - t/t9169-git-svn-dcommit-crlf.sh | 27 +++++++++++++++++++++++++++
>     +     git-svn.perl                    |  1 +
>     + A+x t/t9169-git-svn-dcommit-crlf.sh | 27 +++++++++++++++++++++++++++
>       2 files changed, 28 insertions(+)
>     - create mode 100755 t/t9169-git-svn-dcommit-crlf.sh

Interesting. 0433d533f1 is a merge commit, perhaps that has something
to do with this. Adding --first-parent does show "create mode" line.
I'll check this later.
-- 
Duy




[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