All of lore.kernel.org
 help / color / mirror / Atom feed
From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: "Martin Ågren" <martin.agren@gmail.com>
Cc: Shulhan <ms@kilabit.info>, Git Mailing List <git@vger.kernel.org>
Subject: Re: [bug] Multiline value should error if the next line is section
Date: Sun, 6 May 2018 21:09:43 +0000	[thread overview]
Message-ID: <20180506210943.GA953644@genre.crustytoothpaste.net> (raw)
In-Reply-To: <CAN0heSooYuGkxP9u0Uuwu_TCEOd_pj20L05=bwwHynPOapej6g@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1172 bytes --]

On Sun, May 06, 2018 at 10:03:10PM +0200, Martin Ågren wrote:
> This behavior looks correct to me, though. It seems very hard to me to
> second-guess what the user meant. For example, what if that third line
> contained a "="? Like:
> 
> [alias]
>         huh = !dd \
>               bs=1024 ...
> 
> Should Git guess that the backslash on the second line was a mistake?
> Or maybe not, because alias.bs = "1024 ..." would be a useless alias?
> 
> I think such guessing would be theoretically possible, but especially if
> Git guesses wrong, that could be very frustrating to fight against.

I agree that trying to guess what the user wanted here is likely
impossible.

Furthermore, Git intentionally ignores unknown options.  For example, I
have advice and diff options set in my .gitconfig that would not be
valid on the Git shipped with a base CentOS 6 (which, unfortunately, I
sometimes have to use).  It's very convenient for users working across a
variety of systems that unknown options are simply ignored, even if that
means sometimes mistakes are not caught.
-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 867 bytes --]

  reply	other threads:[~2018-05-06 21:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-06 19:03 [bug] Multiline value should error if the next line is section Shulhan
2018-05-06 20:03 ` Martin Ågren
2018-05-06 21:09   ` brian m. carlson [this message]
2018-05-06 23:03   ` Shulhan
2018-05-06 23:25     ` SZEDER Gábor

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=20180506210943.GA953644@genre.crustytoothpaste.net \
    --to=sandals@crustytoothpaste.net \
    --cc=git@vger.kernel.org \
    --cc=martin.agren@gmail.com \
    --cc=ms@kilabit.info \
    /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.