{"thread":{"id":"31137","subject":"inconsistent logs when displayed on screen / piped to a file","startedAt":"2012-07-30T12:25:42Z","lastAt":"2012-07-31T08:08:55Z","messageCount":5,"participants":["Mojca Miklavec","Michael J Gruber","Carlos Martín Nieto","Jan Engelhardt"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"196117","messageId":"CALBOmsYh5AgpRQe28yUcChqemQ7HFMHahesGj_MPwQXDF-EM=Q@mail.gmail.com","threadId":"31137","inReplyTo":null,"subject":"inconsistent logs when displayed on screen / piped to a file","fromName":"Mojca Miklavec","fromEmail":"mojca.miklavec.lists@gmail.com","sentAt":"2012-07-30T12:25:42Z","receivedAt":"2012-07-30T12:25:42Z","isPatch":false,"sender":{"key":"mojca.miklavec.lists@gmail.com","avatar":null},"body":"Hello,\n\nI'm trying to use \"git log\" to generate ChangeLog for a project\nrecently migrated from CVS.\n\nThe problem is that\n    git log --summary --stat --no-merges --date=short --decorate=short\nbehaves differently when the result is displayed on screen and when it\nis piped to a file.\n\nFor example, running the commands:\n    a) git log --summary --stat --no-merges --date=short\n--decorate=short e9f65aa976\n    b) git log --summary --stat --no-merges --date=short\n--decorate=short e9f65aa976 > /tmp/log.txt\nwould result in two different outputs:\n\na)\n\n aquaterm/Docs/gptProtocol.rtf                         |  316\n++++++++++++++++++++++++++\n aquaterm/English.lproj/GPTInfoWindow.nib/classes.nib  |   12 +\n aquaterm/English.lproj/GPTInfoWindow.nib/info.nib     |   12 +\n aquaterm/English.lproj/GPTInfoWindow.nib/objects.nib  |  Bin 0 -> 1010 bytes\n aquaterm/English.lproj/GPTInfoWindow~.nib/classes.nib |    4 +\n aquaterm/English.lproj/GPTInfoWindow~.nib/info.nib    |   12 +\n aquaterm/English.lproj/GPTInfoWindow~.nib/objects.nib |  Bin 0 -> 1232 bytes\n aquaterm/English.lproj/GPTWindow.nib/classes.nib      |   13 ++\n aquaterm/English.lproj/GPTWindow.nib/info.nib         |   12 +\n\nb)\n\n aquaterm/Docs/gptProtocol.rtf                      |  316 ++++++\n .../English.lproj/GPTInfoWindow.nib/classes.nib    |   12 +\n aquaterm/English.lproj/GPTInfoWindow.nib/info.nib  |   12 +\n .../English.lproj/GPTInfoWindow.nib/objects.nib    |  Bin 0 -> 1010 bytes\n .../English.lproj/GPTInfoWindow~.nib/classes.nib   |    4 +\n aquaterm/English.lproj/GPTInfoWindow~.nib/info.nib |   12 +\n .../English.lproj/GPTInfoWindow~.nib/objects.nib   |  Bin 0 -> 1232 bytes\n aquaterm/English.lproj/GPTWindow.nib/classes.nib   |   13 +\n aquaterm/English.lproj/GPTWindow.nib/info.nib      |   12 +\n\n\nThe project where the results could be easily reproduced is the following:\n    https://github.com/AquaTerm/AquaTerm\n    git://github.com/AquaTerm/AquaTerm.git\n\nIt is possible that I screwed up something when importing the project\nfrom CVS. In that case I would be happy if someone could point me out\nwhat exactly I did wrong, and I can still rewrite the history before\nthe first release of the project using git.\n\nBut in any case I find it weird that I get two different outputs.\n\nI would be grateful for any clues or hints about what goes wrong.\n\nMojca\n"},{"id":"196123","messageId":"50168E93.2090202@drmicha.warpmail.net","threadId":"31137","inReplyTo":"CALBOmsYh5AgpRQe28yUcChqemQ7HFMHahesGj_MPwQXDF-EM=Q@mail.gmail.com","subject":"Re: inconsistent logs when displayed on screen / piped to a file","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2012-07-30T13:39:31Z","receivedAt":"2012-07-30T13:39:31Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Mojca Miklavec venit, vidit, dixit 30.07.2012 14:25:\n> Hello,\n> \n> I'm trying to use \"git log\" to generate ChangeLog for a project\n> recently migrated from CVS.\n> \n> The problem is that\n>     git log --summary --stat --no-merges --date=short --decorate=short\n> behaves differently when the result is displayed on screen and when it\n> is piped to a file.\n> \n> For example, running the commands:\n>     a) git log --summary --stat --no-merges --date=short\n> --decorate=short e9f65aa976\n>     b) git log --summary --stat --no-merges --date=short\n> --decorate=short e9f65aa976 > /tmp/log.txt\n> would result in two different outputs:\n> \n> a)\n> \n>  aquaterm/Docs/gptProtocol.rtf                         |  316\n> ++++++++++++++++++++++++++\n>  aquaterm/English.lproj/GPTInfoWindow.nib/classes.nib  |   12 +\n>  aquaterm/English.lproj/GPTInfoWindow.nib/info.nib     |   12 +\n>  aquaterm/English.lproj/GPTInfoWindow.nib/objects.nib  |  Bin 0 -> 1010 bytes\n>  aquaterm/English.lproj/GPTInfoWindow~.nib/classes.nib |    4 +\n>  aquaterm/English.lproj/GPTInfoWindow~.nib/info.nib    |   12 +\n>  aquaterm/English.lproj/GPTInfoWindow~.nib/objects.nib |  Bin 0 -> 1232 bytes\n>  aquaterm/English.lproj/GPTWindow.nib/classes.nib      |   13 ++\n>  aquaterm/English.lproj/GPTWindow.nib/info.nib         |   12 +\n> \n> b)\n> \n>  aquaterm/Docs/gptProtocol.rtf                      |  316 ++++++\n>  .../English.lproj/GPTInfoWindow.nib/classes.nib    |   12 +\n>  aquaterm/English.lproj/GPTInfoWindow.nib/info.nib  |   12 +\n>  .../English.lproj/GPTInfoWindow.nib/objects.nib    |  Bin 0 -> 1010 bytes\n>  .../English.lproj/GPTInfoWindow~.nib/classes.nib   |    4 +\n>  aquaterm/English.lproj/GPTInfoWindow~.nib/info.nib |   12 +\n>  .../English.lproj/GPTInfoWindow~.nib/objects.nib   |  Bin 0 -> 1232 bytes\n>  aquaterm/English.lproj/GPTWindow.nib/classes.nib   |   13 +\n>  aquaterm/English.lproj/GPTWindow.nib/info.nib      |   12 +\n> \n> \n> The project where the results could be easily reproduced is the following:\n>     https://github.com/AquaTerm/AquaTerm\n>     git://github.com/AquaTerm/AquaTerm.git\n> \n> It is possible that I screwed up something when importing the project\n> from CVS. In that case I would be happy if someone could point me out\n> what exactly I did wrong, and I can still rewrite the history before\n> the first release of the project using git.\n> \n> But in any case I find it weird that I get two different outputs.\n> \n> I would be grateful for any clues or hints about what goes wrong.\n> \n> Mojca\n> \n\nThe only difference that I see is the formatting. (\"...\" is merely an\nabbreviation for a leading path.)\n\na) probes your terminal for the number of columns and uses all available\nspace.\n\nb) goes to a file and has no connected terminal, thus uses a default\ncolumn number. You can change that number using\n\nCOLUMNS=YourNumber git log YourArgs > YourFile\n\nMichael\n"},{"id":"196124","messageId":"1343656217.3970.5.camel@centaur.cmartin.tk","threadId":"31137","inReplyTo":"50168E93.2090202@drmicha.warpmail.net","subject":"Re: inconsistent logs when displayed on screen / piped to a file","fromName":"Carlos Martín Nieto","fromEmail":"cmn@elego.de","sentAt":"2012-07-30T13:50:17Z","receivedAt":"2012-07-30T13:50:17Z","isPatch":false,"sender":{"key":"cmn@elego.de","avatar":"https://avatars.githubusercontent.com/u/335443?v=4"},"body":"On Mon, 2012-07-30 at 15:39 +0200, Michael J Gruber wrote:\n> a) probes your terminal for the number of columns and uses all available\n> space.\n> \n> b) goes to a file and has no connected terminal, thus uses a default\n> column number. You can change that number using\n> \n> COLUMNS=YourNumber git log YourArgs > YourFile\n\nYou can also pass a width to --stat. See the git log manpage for details\nabout which widths you can override.\n\n   cmn\n"},{"id":"196143","messageId":"CALBOmsage+Gx9=bkH0rX1SvViSbMUPUWuYoifjgEnsjw+0=osw@mail.gmail.com","threadId":"31137","inReplyTo":"50168E93.2090202@drmicha.warpmail.net","subject":"Re: inconsistent logs when displayed on screen / piped to a file","fromName":"Mojca Miklavec","fromEmail":"mojca.miklavec.lists@gmail.com","sentAt":"2012-07-30T14:58:28Z","receivedAt":"2012-07-30T14:58:28Z","isPatch":false,"sender":{"key":"mojca.miklavec.lists@gmail.com","avatar":null},"body":"On Mon, Jul 30, 2012 at 3:39 PM, Michael J Gruber wrote:\n> Mojca Miklavec venit, vidit, dixit 30.07.2012 14:25:\n>>\n>> I'm trying to use \"git log\" to generate ChangeLog for a project\n>> recently migrated from CVS.\n>>\n>> The problem is that\n>>     git log --summary --stat --no-merges --date=short --decorate=short\n>> behaves differently when the result is displayed on screen and when it\n>> is piped to a file.\n>\n> The only difference that I see is the formatting. (\"...\" is merely an\n> abbreviation for a leading path.)\n>\n> a) probes your terminal for the number of columns and uses all available\n> space.\n>\n> b) goes to a file and has no connected terminal, thus uses a default\n> column number. You can change that number using\n>\n> COLUMNS=YourNumber git log YourArgs > YourFile\n\nWow, perfect, thank you very much. Setting COLUMNS=200 (the high\nnumber just in case) solved the problem.\n\nMojca\n"},{"id":"196212","messageId":"alpine.LNX.2.01.1207311008350.11095@frira.zrqbmnf.qr","threadId":"31137","inReplyTo":"CALBOmsage+Gx9=bkH0rX1SvViSbMUPUWuYoifjgEnsjw+0=osw@mail.gmail.com","subject":"Re: inconsistent logs when displayed on screen / piped to a file","fromName":"Jan Engelhardt","fromEmail":"jengelh@inai.de","sentAt":"2012-07-31T08:08:55Z","receivedAt":"2012-07-31T08:08:55Z","isPatch":false,"sender":{"key":"jengelh@inai.de","avatar":"https://avatars.githubusercontent.com/u/8861948?v=4"},"body":"On Monday 2012-07-30 16:58, Mojca Miklavec wrote:\n>>\n>> COLUMNS=YourNumber git log YourArgs > YourFile\n>\n>Wow, perfect, thank you very much. Setting COLUMNS=200 (the high\n>number just in case) solved the problem.\n\n200 ought to be enough for everybody? PATH_MAX is never enough...\n"}]}