git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* 2.10.0: git log --oneline prints gpg signatures in 4 lines
@ 2016-09-20 15:09 Leandro Lucarella
  2016-09-20 23:15 ` Jeff King
  2016-09-21 16:19 ` Junio C Hamano
  0 siblings, 2 replies; 7+ messages in thread
From: Leandro Lucarella @ 2016-09-20 15:09 UTC (permalink / raw)
  To: git

Hi, starting from 2.10.0 I noticed that when using git log --oneline,
if commits are signed with GPG, now the signatures are printed too, and
it takes 3 lines for the signature information + 1 line for the title
of the commit, so suddenly --oneline became --fourline :)

Is this really intended?

-- 
Leandro Lucarella
Technical Development Lead
Sociomantic Labs GmbH <http://www.sociomantic.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 2.10.0: git log --oneline prints gpg signatures in 4 lines
  2016-09-20 15:09 2.10.0: git log --oneline prints gpg signatures in 4 lines Leandro Lucarella
@ 2016-09-20 23:15 ` Jeff King
  2016-09-21 10:24   ` Leandro Lucarella
                     ` (2 more replies)
  2016-09-21 16:19 ` Junio C Hamano
  1 sibling, 3 replies; 7+ messages in thread
From: Jeff King @ 2016-09-20 23:15 UTC (permalink / raw)
  To: Leandro Lucarella; +Cc: Mehul Jain, git

On Tue, Sep 20, 2016 at 05:09:54PM +0200, Leandro Lucarella wrote:

> Hi, starting from 2.10.0 I noticed that when using git log --oneline,
> if commits are signed with GPG, now the signatures are printed too, and
> it takes 3 lines for the signature information + 1 line for the title
> of the commit, so suddenly --oneline became --fourline :)
> 
> Is this really intended?

I don't think anything has changed here in 2.10. Running "git log
--oneline --show-signature" has _always_ been horribly ugly. However,
2.10 did introduce the "log.showsignature" config, which makes "git log
--oneline" pretty unusable when it is enabled. Ditto for one-liner uses
of "--format".

I think we should probably ignore the config entirely when using any of
the one-liner formats (and I'd include --format, too, even though it can
sometimes be multi-line; it already has %GG to include that information
as appropriate).

Another option would be to somehow represent the signature information
in the --oneline output, but I think I'd rather leave that for people to
experiment with using "--format".

-Peff

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 2.10.0: git log --oneline prints gpg signatures in 4 lines
  2016-09-20 23:15 ` Jeff King
@ 2016-09-21 10:24   ` Leandro Lucarella
  2016-09-21 13:53   ` Leandro Lucarella
  2016-09-21 16:26   ` Junio C Hamano
  2 siblings, 0 replies; 7+ messages in thread
From: Leandro Lucarella @ 2016-09-21 10:24 UTC (permalink / raw)
  To: Jeff King; +Cc: Mehul Jain, git

On Tue, 20 Sep 2016 19:15:33 -0400
Jeff King <peff@peff.net> wrote:

> On Tue, Sep 20, 2016 at 05:09:54PM +0200, Leandro Lucarella wrote:
> 
> > Hi, starting from 2.10.0 I noticed that when using git log
> > --oneline, if commits are signed with GPG, now the signatures are
> > printed too, and it takes 3 lines for the signature information + 1
> > line for the title of the commit, so suddenly --oneline became
> > --fourline :)
> > 
> > Is this really intended?
> 
> I don't think anything has changed here in 2.10. Running "git log
> --oneline --show-signature" has _always_ been horribly ugly. However,
> 2.10 did introduce the "log.showsignature" config, which makes "git
> log --oneline" pretty unusable when it is enabled. Ditto for
> one-liner uses of "--format".

Right! Now I remember, I changed my configuration when I read the
release notes, before I upgraded. Now that I did upgrade I'm seeing the
results.

Anyway, yeah, using the new configuration makes --oneline pretty
unusable, so ignoring that option for --oneline seems like a good idea.

> I think we should probably ignore the config entirely when using any
> of the one-liner formats (and I'd include --format, too, even though
> it can sometimes be multi-line; it already has %GG to include that
> information as appropriate).
> 
> Another option would be to somehow represent the signature information
> in the --oneline output, but I think I'd rather leave that for people
> to experiment with using "--format".

I think it might be nice to show the information in one line in a ver
succinct way, like just showing a green unicode check mark (✓) or a red
cross mark (❌) if it failed (or just colour the commit subject in
green/red if a signature is present and is passing/failing).

Thanks!

-- 
Leandro Lucarella
Technical Development Lead
Sociomantic Labs GmbH <http://www.sociomantic.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 2.10.0: git log --oneline prints gpg signatures in 4 lines
  2016-09-20 23:15 ` Jeff King
  2016-09-21 10:24   ` Leandro Lucarella
@ 2016-09-21 13:53   ` Leandro Lucarella
  2016-09-21 15:05     ` Michael J Gruber
  2016-09-21 16:26   ` Junio C Hamano
  2 siblings, 1 reply; 7+ messages in thread
From: Leandro Lucarella @ 2016-09-21 13:53 UTC (permalink / raw)
  To: Jeff King; +Cc: Mehul Jain, git

On Tue, 20 Sep 2016 19:15:33 -0400
Jeff King <peff@peff.net> wrote:

> On Tue, Sep 20, 2016 at 05:09:54PM +0200, Leandro Lucarella wrote:
> 
> > Hi, starting from 2.10.0 I noticed that when using git log
> > --oneline, if commits are signed with GPG, now the signatures are
> > printed too, and it takes 3 lines for the signature information + 1
> > line for the title of the commit, so suddenly --oneline became
> > --fourline :)
> > 
> > Is this really intended?
> 
> I don't think anything has changed here in 2.10. Running "git log
> --oneline --show-signature" has _always_ been horribly ugly. However,
> 2.10 did introduce the "log.showsignature" config, which makes "git
> log --oneline" pretty unusable when it is enabled. Ditto for
> one-liner uses of "--format".
> 
> I think we should probably ignore the config entirely when using any
> of the one-liner formats (and I'd include --format, too, even though
> it can sometimes be multi-line; it already has %GG to include that
> information as appropriate).

Woops! Definitely it shouldn't be added when --format is used, this is
also breaking some scripts I have using git log --format to get some
information about commits, and GPG information is being output even
when there is anything about GPG requested in the chosen format.

I guess I will disable log.showsignatures for now... :(

-- 
Leandro Lucarella
Technical Development Lead
Sociomantic Labs GmbH <http://www.sociomantic.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 2.10.0: git log --oneline prints gpg signatures in 4 lines
  2016-09-21 13:53   ` Leandro Lucarella
@ 2016-09-21 15:05     ` Michael J Gruber
  0 siblings, 0 replies; 7+ messages in thread
From: Michael J Gruber @ 2016-09-21 15:05 UTC (permalink / raw)
  To: Leandro Lucarella, Jeff King; +Cc: Mehul Jain, git

Leandro Lucarella venit, vidit, dixit 21.09.2016 15:53:
> On Tue, 20 Sep 2016 19:15:33 -0400
> Jeff King <peff@peff.net> wrote:
> 
>> On Tue, Sep 20, 2016 at 05:09:54PM +0200, Leandro Lucarella wrote:
>>
>>> Hi, starting from 2.10.0 I noticed that when using git log
>>> --oneline, if commits are signed with GPG, now the signatures are
>>> printed too, and it takes 3 lines for the signature information + 1
>>> line for the title of the commit, so suddenly --oneline became
>>> --fourline :)
>>>
>>> Is this really intended?
>>
>> I don't think anything has changed here in 2.10. Running "git log
>> --oneline --show-signature" has _always_ been horribly ugly. However,
>> 2.10 did introduce the "log.showsignature" config, which makes "git
>> log --oneline" pretty unusable when it is enabled. Ditto for
>> one-liner uses of "--format".
>>
>> I think we should probably ignore the config entirely when using any
>> of the one-liner formats (and I'd include --format, too, even though
>> it can sometimes be multi-line; it already has %GG to include that
>> information as appropriate).
> 
> Woops! Definitely it shouldn't be added when --format is used, this is
> also breaking some scripts I have using git log --format to get some
> information about commits, and GPG information is being output even
> when there is anything about GPG requested in the chosen format.
> 
> I guess I will disable log.showsignatures for now... :(
> 

I guess that's one of the reasons why I didn't like that config option
to begin with. There's a flood of these config "convenience" options
lately where we have to special case for scripting... Aliases must have
become old school or something.

Note that "git log --show-notes", "git log --oneline --raw", "git log
--oneline -p" and similar are not "one line" either. So
"--show-signature" behaves just like all others.

git log --format="%h %G? %s"

or a colored version thereof may be what you want to alias as "log1" or
such.

Cheers,
Michael

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 2.10.0: git log --oneline prints gpg signatures in 4 lines
  2016-09-20 15:09 2.10.0: git log --oneline prints gpg signatures in 4 lines Leandro Lucarella
  2016-09-20 23:15 ` Jeff King
@ 2016-09-21 16:19 ` Junio C Hamano
  1 sibling, 0 replies; 7+ messages in thread
From: Junio C Hamano @ 2016-09-21 16:19 UTC (permalink / raw)
  To: Leandro Lucarella; +Cc: git

Leandro Lucarella <leandro.lucarella@sociomantic.com> writes:

> Hi, starting from 2.10.0 I noticed that when using git log --oneline,
> if commits are signed with GPG, now the signatures are printed too, and
> it takes 3 lines for the signature information + 1 line for the title
> of the commit, so suddenly --oneline became --fourline :)
>
> Is this really intended?

I think so.  The documentation for --oneline may say "one line per
commit" but in reality, some things cannot be expressed on one line.
It should probably be described as "commit object name and its log
message is formatted to be on a single line" without limiting other
things that the user may have asked to be shown.

And show-signature is an example of what the user additionally can
ask that cannot be fit on a single line.  There probably are others.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 2.10.0: git log --oneline prints gpg signatures in 4 lines
  2016-09-20 23:15 ` Jeff King
  2016-09-21 10:24   ` Leandro Lucarella
  2016-09-21 13:53   ` Leandro Lucarella
@ 2016-09-21 16:26   ` Junio C Hamano
  2 siblings, 0 replies; 7+ messages in thread
From: Junio C Hamano @ 2016-09-21 16:26 UTC (permalink / raw)
  To: Jeff King; +Cc: Leandro Lucarella, Mehul Jain, git

Jeff King <peff@peff.net> writes:

> I don't think anything has changed here in 2.10. Running "git log
> --oneline --show-signature" has _always_ been horribly ugly. However,
> 2.10 did introduce the "log.showsignature" config, which makes "git log
> --oneline" pretty unusable when it is enabled. Ditto for one-liner uses
> of "--format".
>
> I think we should probably ignore the config entirely when using any of
> the one-liner formats (and I'd include --format, too, even though it can
> sometimes be multi-line; it already has %GG to include that information
> as appropriate).
>
> Another option would be to somehow represent the signature information
> in the --oneline output, but I think I'd rather leave that for people to
> experiment with using "--format".

My thinking is that "--oneline --show-signature" and "--oneline"
with log.showsignature set to true without "--no-show-signature" on
the command line should produce identical result.

The current definition of "--oneline" seems to me "the commit object
name and the log message is shown on a single line" (I consider that
the decoration given by "--decorate" is part of "commit object
name"), but there may be other things shown that may not fit on a
single line.

I do not terribly mind changing the definition of "--oneline" to
"what is output is ONLY the commit object name and the log message,
nothing else is shown", though.  After all, the output from "log" is
for human consumption, and it is a bug in the script if it is
depending on parsing the "log" output, so it is OK to change its
output to suit human needs, if necessary.





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-09-21 16:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-20 15:09 2.10.0: git log --oneline prints gpg signatures in 4 lines Leandro Lucarella
2016-09-20 23:15 ` Jeff King
2016-09-21 10:24   ` Leandro Lucarella
2016-09-21 13:53   ` Leandro Lucarella
2016-09-21 15:05     ` Michael J Gruber
2016-09-21 16:26   ` Junio C Hamano
2016-09-21 16:19 ` Junio C Hamano

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