{"thread":{"id":"44121","subject":"2.10.0: git log --oneline prints gpg signatures in 4 lines","startedAt":"2016-09-20T16:42:38Z","lastAt":"2016-09-21T16:26:24Z","messageCount":7,"participants":["Leandro Lucarella","Jeff King","Michael J Gruber","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"302225","messageId":"20160920170954.38b24284@labs-064.localdomain","threadId":"44121","inReplyTo":null,"subject":"2.10.0: git log --oneline prints gpg signatures in 4 lines","fromName":"Leandro Lucarella","fromEmail":"leandro.lucarella@sociomantic.com","sentAt":"2016-09-20T15:09:54Z","receivedAt":"2016-09-20T16:42:38Z","isPatch":false,"sender":{"key":"leandro.lucarella@sociomantic.com","avatar":"https://gravatar.com/avatar/b8884950a0d028195af6bb849af0136915e795824f1d888a9599af7ce3d174af?d=mp&s=160"},"body":"Hi, starting from 2.10.0 I noticed that when using git log --oneline,\nif commits are signed with GPG, now the signatures are printed too, and\nit takes 3 lines for the signature information + 1 line for the title\nof the commit, so suddenly --oneline became --fourline :)\n\nIs this really intended?\n\n-- \nLeandro Lucarella\nTechnical Development Lead\nSociomantic Labs GmbH <http://www.sociomantic.com>\n"},{"id":"302253","messageId":"20160920231533.fxcdjgphz25hnbxt@sigill.intra.peff.net","threadId":"44121","inReplyTo":"20160920170954.38b24284@labs-064.localdomain","subject":"Re: 2.10.0: git log --oneline prints gpg signatures in 4 lines","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2016-09-20T23:15:33Z","receivedAt":"2016-09-20T23:15:40Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Sep 20, 2016 at 05:09:54PM +0200, Leandro Lucarella wrote:\n\n> Hi, starting from 2.10.0 I noticed that when using git log --oneline,\n> if commits are signed with GPG, now the signatures are printed too, and\n> it takes 3 lines for the signature information + 1 line for the title\n> of the commit, so suddenly --oneline became --fourline :)\n> \n> Is this really intended?\n\nI don't think anything has changed here in 2.10. Running \"git log\n--oneline --show-signature\" has _always_ been horribly ugly. However,\n2.10 did introduce the \"log.showsignature\" config, which makes \"git log\n--oneline\" pretty unusable when it is enabled. Ditto for one-liner uses\nof \"--format\".\n\nI think we should probably ignore the config entirely when using any of\nthe one-liner formats (and I'd include --format, too, even though it can\nsometimes be multi-line; it already has %GG to include that information\nas appropriate).\n\nAnother option would be to somehow represent the signature information\nin the --oneline output, but I think I'd rather leave that for people to\nexperiment with using \"--format\".\n\n-Peff\n"},{"id":"302266","messageId":"20160921122454.2a736dea@labs-064.localdomain","threadId":"44121","inReplyTo":"20160920231533.fxcdjgphz25hnbxt@sigill.intra.peff.net","subject":"Re: 2.10.0: git log --oneline prints gpg signatures in 4 lines","fromName":"Leandro Lucarella","fromEmail":"leandro.lucarella@sociomantic.com","sentAt":"2016-09-21T10:24:54Z","receivedAt":"2016-09-21T11:58:52Z","isPatch":false,"sender":{"key":"leandro.lucarella@sociomantic.com","avatar":"https://gravatar.com/avatar/b8884950a0d028195af6bb849af0136915e795824f1d888a9599af7ce3d174af?d=mp&s=160"},"body":"On Tue, 20 Sep 2016 19:15:33 -0400\nJeff King <peff@peff.net> wrote:\n\n> On Tue, Sep 20, 2016 at 05:09:54PM +0200, Leandro Lucarella wrote:\n> \n> > Hi, starting from 2.10.0 I noticed that when using git log\n> > --oneline, if commits are signed with GPG, now the signatures are\n> > printed too, and it takes 3 lines for the signature information + 1\n> > line for the title of the commit, so suddenly --oneline became\n> > --fourline :)\n> > \n> > Is this really intended?\n> \n> I don't think anything has changed here in 2.10. Running \"git log\n> --oneline --show-signature\" has _always_ been horribly ugly. However,\n> 2.10 did introduce the \"log.showsignature\" config, which makes \"git\n> log --oneline\" pretty unusable when it is enabled. Ditto for\n> one-liner uses of \"--format\".\n\nRight! Now I remember, I changed my configuration when I read the\nrelease notes, before I upgraded. Now that I did upgrade I'm seeing the\nresults.\n\nAnyway, yeah, using the new configuration makes --oneline pretty\nunusable, so ignoring that option for --oneline seems like a good idea.\n\n> I think we should probably ignore the config entirely when using any\n> of the one-liner formats (and I'd include --format, too, even though\n> it can sometimes be multi-line; it already has %GG to include that\n> information as appropriate).\n> \n> Another option would be to somehow represent the signature information\n> in the --oneline output, but I think I'd rather leave that for people\n> to experiment with using \"--format\".\n\nI think it might be nice to show the information in one line in a ver\nsuccinct way, like just showing a green unicode check mark (✓) or a red\ncross mark (❌) if it failed (or just colour the commit subject in\ngreen/red if a signature is present and is passing/failing).\n\nThanks!\n\n-- \nLeandro Lucarella\nTechnical Development Lead\nSociomantic Labs GmbH <http://www.sociomantic.com>\n"},{"id":"302274","messageId":"20160921155300.79252e68@labs-064.localdomain","threadId":"44121","inReplyTo":"20160920231533.fxcdjgphz25hnbxt@sigill.intra.peff.net","subject":"Re: 2.10.0: git log --oneline prints gpg signatures in 4 lines","fromName":"Leandro Lucarella","fromEmail":"leandro.lucarella@sociomantic.com","sentAt":"2016-09-21T13:53:00Z","receivedAt":"2016-09-21T14:25:15Z","isPatch":false,"sender":{"key":"leandro.lucarella@sociomantic.com","avatar":"https://gravatar.com/avatar/b8884950a0d028195af6bb849af0136915e795824f1d888a9599af7ce3d174af?d=mp&s=160"},"body":"On Tue, 20 Sep 2016 19:15:33 -0400\nJeff King <peff@peff.net> wrote:\n\n> On Tue, Sep 20, 2016 at 05:09:54PM +0200, Leandro Lucarella wrote:\n> \n> > Hi, starting from 2.10.0 I noticed that when using git log\n> > --oneline, if commits are signed with GPG, now the signatures are\n> > printed too, and it takes 3 lines for the signature information + 1\n> > line for the title of the commit, so suddenly --oneline became\n> > --fourline :)\n> > \n> > Is this really intended?\n> \n> I don't think anything has changed here in 2.10. Running \"git log\n> --oneline --show-signature\" has _always_ been horribly ugly. However,\n> 2.10 did introduce the \"log.showsignature\" config, which makes \"git\n> log --oneline\" pretty unusable when it is enabled. Ditto for\n> one-liner uses of \"--format\".\n> \n> I think we should probably ignore the config entirely when using any\n> of the one-liner formats (and I'd include --format, too, even though\n> it can sometimes be multi-line; it already has %GG to include that\n> information as appropriate).\n\nWoops! Definitely it shouldn't be added when --format is used, this is\nalso breaking some scripts I have using git log --format to get some\ninformation about commits, and GPG information is being output even\nwhen there is anything about GPG requested in the chosen format.\n\nI guess I will disable log.showsignatures for now... :(\n\n-- \nLeandro Lucarella\nTechnical Development Lead\nSociomantic Labs GmbH <http://www.sociomantic.com>\n"},{"id":"302277","messageId":"ebdb9974-9ab8-1e8a-f678-847a798f4c44@drmicha.warpmail.net","threadId":"44121","inReplyTo":"20160921155300.79252e68@labs-064.localdomain","subject":"Re: 2.10.0: git log --oneline prints gpg signatures in 4 lines","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2016-09-21T15:05:05Z","receivedAt":"2016-09-21T15:05:12Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Leandro Lucarella venit, vidit, dixit 21.09.2016 15:53:\n> On Tue, 20 Sep 2016 19:15:33 -0400\n> Jeff King <peff@peff.net> wrote:\n> \n>> On Tue, Sep 20, 2016 at 05:09:54PM +0200, Leandro Lucarella wrote:\n>>\n>>> Hi, starting from 2.10.0 I noticed that when using git log\n>>> --oneline, if commits are signed with GPG, now the signatures are\n>>> printed too, and it takes 3 lines for the signature information + 1\n>>> line for the title of the commit, so suddenly --oneline became\n>>> --fourline :)\n>>>\n>>> Is this really intended?\n>>\n>> I don't think anything has changed here in 2.10. Running \"git log\n>> --oneline --show-signature\" has _always_ been horribly ugly. However,\n>> 2.10 did introduce the \"log.showsignature\" config, which makes \"git\n>> log --oneline\" pretty unusable when it is enabled. Ditto for\n>> one-liner uses of \"--format\".\n>>\n>> I think we should probably ignore the config entirely when using any\n>> of the one-liner formats (and I'd include --format, too, even though\n>> it can sometimes be multi-line; it already has %GG to include that\n>> information as appropriate).\n> \n> Woops! Definitely it shouldn't be added when --format is used, this is\n> also breaking some scripts I have using git log --format to get some\n> information about commits, and GPG information is being output even\n> when there is anything about GPG requested in the chosen format.\n> \n> I guess I will disable log.showsignatures for now... :(\n> \n\nI guess that's one of the reasons why I didn't like that config option\nto begin with. There's a flood of these config \"convenience\" options\nlately where we have to special case for scripting... Aliases must have\nbecome old school or something.\n\nNote that \"git log --show-notes\", \"git log --oneline --raw\", \"git log\n--oneline -p\" and similar are not \"one line\" either. So\n\"--show-signature\" behaves just like all others.\n\ngit log --format=\"%h %G? %s\"\n\nor a colored version thereof may be what you want to alias as \"log1\" or\nsuch.\n\nCheers,\nMichael\n"},{"id":"302284","messageId":"xmqqh999b4zr.fsf@gitster.mtv.corp.google.com","threadId":"44121","inReplyTo":"20160920170954.38b24284@labs-064.localdomain","subject":"Re: 2.10.0: git log --oneline prints gpg signatures in 4 lines","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-09-21T16:19:04Z","receivedAt":"2016-09-21T16:24:56Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Leandro Lucarella <leandro.lucarella@sociomantic.com> writes:\n\n> Hi, starting from 2.10.0 I noticed that when using git log --oneline,\n> if commits are signed with GPG, now the signatures are printed too, and\n> it takes 3 lines for the signature information + 1 line for the title\n> of the commit, so suddenly --oneline became --fourline :)\n>\n> Is this really intended?\n\nI think so.  The documentation for --oneline may say \"one line per\ncommit\" but in reality, some things cannot be expressed on one line.\nIt should probably be described as \"commit object name and its log\nmessage is formatted to be on a single line\" without limiting other\nthings that the user may have asked to be shown.\n\nAnd show-signature is an example of what the user additionally can\nask that cannot be fit on a single line.  There probably are others.\n\n\n\n\n"},{"id":"302285","messageId":"xmqqd1jxb4nr.fsf@gitster.mtv.corp.google.com","threadId":"44121","inReplyTo":"20160920231533.fxcdjgphz25hnbxt@sigill.intra.peff.net","subject":"Re: 2.10.0: git log --oneline prints gpg signatures in 4 lines","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-09-21T16:26:16Z","receivedAt":"2016-09-21T16:26:24Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> I don't think anything has changed here in 2.10. Running \"git log\n> --oneline --show-signature\" has _always_ been horribly ugly. However,\n> 2.10 did introduce the \"log.showsignature\" config, which makes \"git log\n> --oneline\" pretty unusable when it is enabled. Ditto for one-liner uses\n> of \"--format\".\n>\n> I think we should probably ignore the config entirely when using any of\n> the one-liner formats (and I'd include --format, too, even though it can\n> sometimes be multi-line; it already has %GG to include that information\n> as appropriate).\n>\n> Another option would be to somehow represent the signature information\n> in the --oneline output, but I think I'd rather leave that for people to\n> experiment with using \"--format\".\n\nMy thinking is that \"--oneline --show-signature\" and \"--oneline\"\nwith log.showsignature set to true without \"--no-show-signature\" on\nthe command line should produce identical result.\n\nThe current definition of \"--oneline\" seems to me \"the commit object\nname and the log message is shown on a single line\" (I consider that\nthe decoration given by \"--decorate\" is part of \"commit object\nname\"), but there may be other things shown that may not fit on a\nsingle line.\n\nI do not terribly mind changing the definition of \"--oneline\" to\n\"what is output is ONLY the commit object name and the log message,\nnothing else is shown\", though.  After all, the output from \"log\" is\nfor human consumption, and it is a bug in the script if it is\ndepending on parsing the \"log\" output, so it is OK to change its\noutput to suit human needs, if necessary.\n\n\n\n\n"}]}