# (minor concern) git using the pager should not be a default

8 messages from 2012-08-29 to 2012-08-31. Participants: Emmanuel Michon, Junio C Hamano, dag@cray.com, Andreas Schwab, Jeff King.
Thread: https://gitlist.dev/t/31381

## Emmanuel Michon, 2012-08-29 16:02

Subject: (minor concern) git using the pager should not be a default
Message-ID: <503E3CFE.1080603@sigmadesigns.com>
URL: https://gitlist.dev/e/503E3CFE.1080603%40sigmadesigns.com

```
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.

```

## Junio C Hamano, 2012-08-29 17:19

Subject: Re: (minor concern) git using the pager should not be a default
Message-ID: <7vligxwr97.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vligxwr97.fsf%40alter.siamese.dyndns.org
In-Reply-To: <503E3CFE.1080603@sigmadesigns.com>

```
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.

```

## Junio C Hamano, 2012-08-29 17:50

Subject: Re: (minor concern) git using the pager should not be a default
Message-ID: <7vd329wpt0.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vd329wpt0.fsf%40alter.siamese.dyndns.org
In-Reply-To: <503E3CFE.1080603@sigmadesigns.com>

```
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 ;-).

```

## dag@cray.com, 2012-08-31 17:54

Subject: Re: (minor concern) git using the pager should not be a default
Message-ID: <nngligvdk0q.fsf@transit.us.cray.com>
URL: https://gitlist.dev/e/nngligvdk0q.fsf%40transit.us.cray.com
In-Reply-To: <7vd329wpt0.fsf@alter.siamese.dyndns.org>

```
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

```

## Andreas Schwab, 2012-08-31 18:09

Subject: Re: (minor concern) git using the pager should not be a default
Message-ID: <m2a9xblyqp.fsf@igel.home>
URL: https://gitlist.dev/e/m2a9xblyqp.fsf%40igel.home
In-Reply-To: <nngligvdk0q.fsf@transit.us.cray.com>

```
<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."

```

## Junio C Hamano, 2012-08-31 18:48

Subject: Re: (minor concern) git using the pager should not be a default
Message-ID: <7vy5kunbig.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vy5kunbig.fsf%40alter.siamese.dyndns.org
In-Reply-To: <nngligvdk0q.fsf@transit.us.cray.com>

```
<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?

```

## Jeff King, 2012-08-31 21:43

Subject: Re: (minor concern) git using the pager should not be a default
Message-ID: <20120831214312.GB3008@sigill.intra.peff.net>
URL: https://gitlist.dev/e/20120831214312.GB3008%40sigill.intra.peff.net
In-Reply-To: <m2a9xblyqp.fsf@igel.home>

```
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

```

## dag@cray.com, 2012-08-31 23:03

Subject: Re: (minor concern) git using the pager should not be a default
Message-ID: <nngd3267jgq.fsf@transit.us.cray.com>
URL: https://gitlist.dev/e/nngd3267jgq.fsf%40transit.us.cray.com
In-Reply-To: <20120831214312.GB3008@sigill.intra.peff.net>

```
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

```
