git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* (minor concern) git using the pager should not be a default
@ 2012-08-29 16:02 Emmanuel Michon
  2012-08-29 17:19 ` Junio C Hamano
  2012-08-29 17:50 ` Junio C Hamano
  0 siblings, 2 replies; 8+ messages in thread
From: Emmanuel Michon @ 2012-08-29 16:02 UTC (permalink / raw)
  To: git

Hello,

I'm risking myself on this mailing list after looking for some advise on
IRC. Basically I know about this previous attempt
http://marc.info/?l=git&m=122955045415845&w=2 but my request has little
to do with emacs.

I believe UNIX recommends some rules in the «less is more» spirit when
designing command line applications [basically listed here:
http://en.wikipedia.org/wiki/Unix_philosophy].

As far as I understand those, stdin/out/err would be better left with
minimum processing. Silent execution with $? = 0 is the best thing that
can happen.

Per those rules, which I think apply to Linux apps, it would be
preferrable if the *default* setup of git didn't fork a pager, didn't
use colors, didn't behave differently whether piped or not.

Of course I would be the first to always call the tool with
git diff |less
excepted when I do git diff |diffstat
or enjoy such options as command line or environment switches to git.
when I want.

So the point is more about the appropriateness of pushing that special
ergonomy to all users, knowing it makes most users happy.

Isn't the design principle superior to the wishes of the masses?

Thanks for reading,
Don't laugh,
Keep on the good work.

Sincerely yours,

e.m.

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

* Re: (minor concern) git using the pager should not be a default
  2012-08-29 16:02 (minor concern) git using the pager should not be a default Emmanuel Michon
@ 2012-08-29 17:19 ` Junio C Hamano
  2012-08-29 17:50 ` Junio C Hamano
  1 sibling, 0 replies; 8+ messages in thread
From: Junio C Hamano @ 2012-08-29 17:19 UTC (permalink / raw)
  To: Emmanuel Michon; +Cc: git

Emmanuel Michon <emmanuel_michon@sigmadesigns.com> writes:

> Isn't the design principle superior to the wishes of the masses?

Only when you are living an ideal fantasy land.

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

* Re: (minor concern) git using the pager should not be a default
  2012-08-29 16:02 (minor concern) git using the pager should not be a default Emmanuel Michon
  2012-08-29 17:19 ` Junio C Hamano
@ 2012-08-29 17:50 ` Junio C Hamano
  2012-08-31 17:54   ` dag
  1 sibling, 1 reply; 8+ messages in thread
From: Junio C Hamano @ 2012-08-29 17:50 UTC (permalink / raw)
  To: Emmanuel Michon; +Cc: git

Emmanuel Michon <emmanuel_michon@sigmadesigns.com> writes:

> I believe UNIX recommends some rules in the «less is more» spirit when
> designing command line applications [basically listed here:
> http://en.wikipedia.org/wiki/Unix_philosophy].

That is exactly why our plumbing layer of commands (e.g. "git
diff-tree", "git rev-list") do not page by default for people who
want to go bare-metal Unix philosophy.

In other words, Porcelain (roughly speaking, those that page by
default when their standard output is terminal), are not "command
line applications"; they have a layer on top with a built-in UI.

If you follow Unix philosophy and want to combine tools each of
which is designed to do one thing and one thing well, you would be
using the commands from the plumbing layer to write your scripts,
and wouldn't have to raise that "minor concern" in the first place,
as they do not page by default ;-).

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

* Re: (minor concern) git using the pager should not be a default
  2012-08-29 17:50 ` Junio C Hamano
@ 2012-08-31 17:54   ` dag
  2012-08-31 18:09     ` Andreas Schwab
  2012-08-31 18:48     ` Junio C Hamano
  0 siblings, 2 replies; 8+ messages in thread
From: dag @ 2012-08-31 17:54 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Emmanuel Michon, git

Junio C Hamano <gitster@pobox.com> writes:

> In other words, Porcelain (roughly speaking, those that page by
> default when their standard output is terminal), are not "command
> line applications"; they have a layer on top with a built-in UI.

Is "status" considered a plumbing layer command?  Because I have often
wondered why it does not use the pager by default.  I pipe it through
less all the time and it's kind of annoying that it works differently
than everything else.

                                -Dave

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

* Re: (minor concern) git using the pager should not be a default
  2012-08-31 17:54   ` dag
@ 2012-08-31 18:09     ` Andreas Schwab
  2012-08-31 21:43       ` Jeff King
  2012-08-31 18:48     ` Junio C Hamano
  1 sibling, 1 reply; 8+ messages in thread
From: Andreas Schwab @ 2012-08-31 18:09 UTC (permalink / raw)
  To: dag; +Cc: Junio C Hamano, Emmanuel Michon, git

<dag@cray.com> writes:

> Is "status" considered a plumbing layer command?  Because I have often
> wondered why it does not use the pager by default.  I pipe it through
> less all the time and it's kind of annoying that it works differently
> than everything else.

I would be pretty annoyed if git status would page by default.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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

* Re: (minor concern) git using the pager should not be a default
  2012-08-31 17:54   ` dag
  2012-08-31 18:09     ` Andreas Schwab
@ 2012-08-31 18:48     ` Junio C Hamano
  1 sibling, 0 replies; 8+ messages in thread
From: Junio C Hamano @ 2012-08-31 18:48 UTC (permalink / raw)
  To: dag; +Cc: Emmanuel Michon, git

<dag@cray.com> writes:

> Junio C Hamano <gitster@pobox.com> writes:
>
>> In other words, Porcelain (roughly speaking, those that page by
>> default when their standard output is terminal), are not "command
>> line applications"; they have a layer on top with a built-in UI.
>
> Is "status" considered a plumbing layer command?

Have you asked "git help git" lately?

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

* Re: (minor concern) git using the pager should not be a default
  2012-08-31 18:09     ` Andreas Schwab
@ 2012-08-31 21:43       ` Jeff King
  2012-08-31 23:03         ` dag
  0 siblings, 1 reply; 8+ messages in thread
From: Jeff King @ 2012-08-31 21:43 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: dag, Junio C Hamano, Emmanuel Michon, git

On Fri, Aug 31, 2012 at 08:09:34PM +0200, Andreas Schwab wrote:

> <dag@cray.com> writes:
> 
> > Is "status" considered a plumbing layer command?  Because I have often
> > wondered why it does not use the pager by default.  I pipe it through
> > less all the time and it's kind of annoying that it works differently
> > than everything else.
> 
> I would be pretty annoyed if git status would page by default.

This one has been debated for a while. People used to complain that it
did not page, and then we turned on the pager, and then people
complained that it did page. I wrote 4e10738 (Allow per-command pager
config, 2008-07-03) to help settle it, and now you can do:

  git config pager.status true

if you really want it. As of 9bad723 (allow command-specific pagers in
pager.<cmd>, 2010-11-17), you can even set it to an arbitrary pager for
each git command.

With all those options, it's amazing that we can still have threads
about what should page. :)

-Peff

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

* Re: (minor concern) git using the pager should not be a default
  2012-08-31 21:43       ` Jeff King
@ 2012-08-31 23:03         ` dag
  0 siblings, 0 replies; 8+ messages in thread
From: dag @ 2012-08-31 23:03 UTC (permalink / raw)
  To: Jeff King; +Cc: Andreas Schwab, Junio C Hamano, Emmanuel Michon, git

Jeff King <peff@peff.net> writes:

> if you really want it. As of 9bad723 (allow command-specific pagers in
> pager.<cmd>, 2010-11-17), you can even set it to an arbitrary pager for
> each git command.

Cool!

> With all those options, it's amazing that we can still have threads
> about what should page. :)

Well to be fair, it's hard to know when to read the documentation again.
:)

                               -Dave

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

end of thread, other threads:[~2012-08-31 23:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-29 16:02 (minor concern) git using the pager should not be a default Emmanuel Michon
2012-08-29 17:19 ` Junio C Hamano
2012-08-29 17:50 ` Junio C Hamano
2012-08-31 17:54   ` dag
2012-08-31 18:09     ` Andreas Schwab
2012-08-31 21:43       ` Jeff King
2012-08-31 23:03         ` dag
2012-08-31 18:48     ` Junio C Hamano

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 NNTP newsgroup(s).