All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: David Kastrup <dak@gnu.org>
Cc: d9ba@mailtor.net, git@vger.kernel.org
Subject: Re: Harmful LESS flags
Date: Thu, 24 Apr 2014 12:02:04 -0700	[thread overview]
Message-ID: <xmqqha5iv9eb.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: 87lhuvb9kr.fsf@fencepost.gnu.org

David Kastrup <dak@gnu.org> writes:

> d9ba@mailtor.net writes:
>
>> It would be nice if we could change the flags to either
>>
>>  a) avoid cutting off
>>  b) indicate something has been cut off (<- I prefer this)
>>
>> I assume there are more people with a similar workflow who're still
>> unaware of this feature.
>>
>> I would joke about how 3 letter agencies introduced this flag to
>> backdoor open source projects, but, well..
>
> Most terminals are wider than three letters.

I am having a hard time to decide if you genuinely misread what you
are responding to, or if you are joking.  If the latter, I find the
joke mildly funny in a twisted way ;-)

But the tangent aside...

> Still, it is a total nuisance.  I am constantly doing
>
> -S RET
>
> on my git output.  This should be left alone as an entirely personal
> preference quite unrelated to Git.  There is no point in having Git
> configure a default different from what is used elsewhere.

I almost agree with the general principle of the last sentence, but
with a bit of reservation.  The default value for LESS (i.e. when
the user does not have any) we pass is FRSX, and the Porcelain
output these days is colored by default.  If we don't set a default
at all, the end-user experience for a newbie will be bad, especially
without "R".

Among the other three, F and X are to avoid a short output (e.g "git
show" on a one-liner with a short explanation) from asking for
confirmation to leave the pager and from clearing the screen upon
leaving the pager, and are generally accepted as good things (or at
least, we haven't seen much issue raised after we started passing
the default LESS for those who do not have their own in their
environment).

Use of S is very subjective.  While I personally do appreciate that
we have it by default, I can perfectly well understand why some
people do not want to see it in the default.  The best we can do is
to arrange so that people from one of the camps have their favorite
out of the box and those from the other camp need to tell Git that
they want to (or do not want to) fold long lines.

Traditionally, because the tool grew in a context of being used in a
project whose participants are at least not malicious, always having
to be on the lookout for fear of middle-of-line tabs hiding bad
contents near the right edges of lines has never been an issue.  If
somebody brought up a potential issue of such mode of attack back
then, Linus may have chosen the default differently.  I may have
myself chosen not to have S, if I were the maintainer when the LESS
default was originally introduced, and had I been made aware of this
issue.

I am not opposed to changing the default in the longer term, as long
as we have a solid transition plan to ensure that it won't disrupt
and/or upset existing users too much.

  reply	other threads:[~2014-04-24 19:02 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-23 23:46 Harmful LESS flags d9ba
2014-04-24  0:11 ` Jonathan Nieder
2014-04-28 21:38   ` Mark Nudelman
2014-04-24  5:06 ` David Kastrup
2014-04-24 19:02   ` Junio C Hamano [this message]
2014-04-24 19:21     ` David Kastrup
2014-04-24 19:29       ` Junio C Hamano
2014-04-24 19:50         ` David Kastrup
2014-04-24 21:35         ` Jeff King
2014-04-24 21:47           ` Junio C Hamano
2014-04-24 22:02             ` Jeff King
2014-04-24 21:48           ` David Kastrup
2014-04-24 22:13             ` Jeff King
2014-04-24 22:44               ` David Kastrup
2014-04-24 23:08                 ` Jonathan Nieder
2014-04-25  6:56     ` Matthieu Moy
2014-04-25 15:11       ` Jonathan Nieder
2014-04-25 15:32         ` David Kastrup
2014-04-25 15:47           ` Jonathan Nieder
2014-04-28  8:34             ` [PATCH] PAGER_ENV: remove 'S' from $LESS by default Matthieu Moy
2014-04-28  8:43               ` David Kastrup
2014-04-28  8:59                 ` Matthieu Moy
2014-04-28  9:14                   ` David Kastrup
2014-04-28 12:22                     ` Matthieu Moy
2014-04-28 16:24                       ` Jeff King
2014-04-28 18:48                         ` Junio C Hamano
2014-04-29 12:29                           ` Matthieu Moy
2014-04-29 17:01                             ` Junio C Hamano
2014-04-30  7:35                               ` [PATCH v2] pager: " Matthieu Moy
2014-04-30 15:38                                 ` Junio C Hamano
2014-04-30 15:49                                   ` Matthieu Moy
2014-04-30 17:34                                     ` Junio C Hamano
2014-05-05 18:44                                 ` Jonathan Nieder
2014-05-05 20:10                                   ` Matthieu Moy
2014-05-06 17:34                                     ` Junio C Hamano
2014-05-06 18:00                                       ` David Kastrup
2014-05-06 18:49                                         ` Matthieu Moy
2014-05-06 21:55                                           ` Jeff King
2014-05-07 17:07                                             ` Junio C Hamano
2014-05-07 17:54                                               ` Matthieu Moy
2014-05-07 20:42                                                 ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqha5iv9eb.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=d9ba@mailtor.net \
    --cc=dak@gnu.org \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.