Thread (5 messages) flat view 5 messages, 4 authors, 2016-06-15

Re: inconsistent logs when displayed on screen / piped to a file

From: Mojca Miklavec <hidden>
Date: 2016-06-15 22:54:23

On Mon, Jul 30, 2012 at 3:39 PM, Michael J Gruber wrote:
Mojca Miklavec venit, vidit, dixit 30.07.2012 14:25:
quoted
I'm trying to use "git log" to generate ChangeLog for a project
recently migrated from CVS.

The problem is that
    git log --summary --stat --no-merges --date=short --decorate=short
behaves differently when the result is displayed on screen and when it
is piped to a file.
The only difference that I see is the formatting. ("..." is merely an
abbreviation for a leading path.)

a) probes your terminal for the number of columns and uses all available
space.

b) goes to a file and has no connected terminal, thus uses a default
column number. You can change that number using

COLUMNS=YourNumber git log YourArgs > YourFile
Wow, perfect, thank you very much. Setting COLUMNS=200 (the high
number just in case) solved the problem.

Mojca
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help