About git pretty

4 messages, 3 authors, 2016-06-15 · open the first message on its own page

About git pretty

From: Felipe Contreras <hidden>
Date: 2016-06-15 22:45:12

Hi,

Please read aloud the following commands:
git log --pretty=short
git log --pretty=full
git log --pretty=format:%s

It is just me or 'pretty full' doesn't exactly convey the meaning of
the action to execute?

How about:
git log --format=short
git log --format=full
git log --format=custom:%s

If you like the idea I can work on a patch.

Best regards.

-- 
Felipe Contreras

Re: About git pretty

From: Stephan Beyer <hidden>
Date: 2016-06-15 22:45:12

Hi,

Felipe Contreras wrote:
Hi,

Please read aloud the following commands:
git log --pretty=short
git log --pretty=full
git log --pretty=format:%s

It is just me or 'pretty full' doesn't exactly convey the meaning of
the action to execute?
But "pretty short" and "pretty format" is. :)
How about:
git log --format=short
git log --format=full
git log --format=custom:%s

If you like the idea I can work on a patch.
Because --pretty=<format> is an option taken by many git commands including
git plumbing (e.g. rev-list), many scripts will rely on "--pretty" and they
all would have to be changed. And --pretty exists since Jan 2005 (see
9d97aa64).

Also, --format is an option available to git-archive and git-for-each-ref
with a different intention for each. --pretty exists for several git
commands with the same intention for all (I think) -- pretty-printing
commit objects.

And, btw, I also do not think that your idea does really solve the 
"problem" that it always will make sense when you read it aloud.

Thus it seems that --format has no benefit over --pretty at all. :-)


Ahh, another thought:
If a new git user is looking for an option to _format_ git-log output,
she will surely search the git-log manual page for the word "format", finding

 1. --raw
 2. --shortstat
 3. --abbrev
 4. --full-index
 5. --pretty
  STRIKE!

This makes me wonder if it could make sense to move --pretty up in the
git-log manual page, but I do not think renaming it is worth the
trouble.

Regards,
  Stephan

-- 
Stephan Beyer [off-list ref], PGP 0x6EDDD207FCC5040F

Re: About git pretty

From: Felipe Contreras <hidden>
Date: 2016-06-15 22:45:13

On Sat, Aug 23, 2008 at 3:03 AM, Stephan Beyer [off-list ref] wrote:
Hi,

Felipe Contreras wrote:
quoted
Hi,

Please read aloud the following commands:
git log --pretty=short
git log --pretty=full
git log --pretty=format:%s

It is just me or 'pretty full' doesn't exactly convey the meaning of
the action to execute?
But "pretty short" and "pretty format" is. :)
quoted
How about:
git log --format=short
git log --format=full
git log --format=custom:%s

If you like the idea I can work on a patch.
Because --pretty=<format> is an option taken by many git commands including
git plumbing (e.g. rev-list), many scripts will rely on "--pretty" and they
all would have to be changed. And --pretty exists since Jan 2005 (see
9d97aa64).
Well, it might be difficult, but that doesn't mean it should not be
done. Just like the 'git-*' removal, there could be a period for
transition.
Also, --format is an option available to git-archive and git-for-each-ref
with a different intention for each. --pretty exists for several git
commands with the same intention for all (I think) -- pretty-printing
commit objects.

And, btw, I also do not think that your idea does really solve the
"problem" that it always will make sense when you read it aloud.

Thus it seems that --format has no benefit over --pretty at all. :-)
Heh, it was just one example. My point is that 'format' is more meaningful.

</snip>

-- 
Felipe Contreras

Re: About git pretty

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:45:13

Hi,

On Sat, 23 Aug 2008, Felipe Contreras wrote:
On Sat, Aug 23, 2008 at 3:03 AM, Stephan Beyer [off-list ref] wrote:
quoted
Felipe Contreras wrote:
quoted
Hi,

Please read aloud the following commands:
git log --pretty=short
git log --pretty=full
git log --pretty=format:%s

It is just me or 'pretty full' doesn't exactly convey the meaning of 
the action to execute?
But "pretty short" and "pretty format" is. :)
quoted
How about:
git log --format=short
git log --format=full
git log --format=custom:%s

If you like the idea I can work on a patch.
Because --pretty=<format> is an option taken by many git commands 
including git plumbing (e.g. rev-list), many scripts will rely on 
"--pretty" and they all would have to be changed. And --pretty exists 
since Jan 2005 (see 9d97aa64).
Well, it might be difficult, but that doesn't mean it should not be 
done. Just like the 'git-*' removal, there could be a period for 
transition.
Of course it could be done.  But I do not deem it necessary.  In the 
balance gain/pain it comes out as not worth the hassle on this guy's 
calculator.

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