Re: [bug] Multiline value should error if the next line is section
- Date: Sun, 6 May 2018 21:09:43 +0000
- From: "brian m. carlson" <sandals@xxxxxxxxxxxxxxxxxxxx>
- Subject: Re: [bug] Multiline value should error if the next line is section
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:
signature.asc
Description: PGP signature
- References:
- [bug] Multiline value should error if the next line is section
- From: Shulhan
- Re: [bug] Multiline value should error if the next line is section
- From: Martin Ågren
- [bug] Multiline value should error if the next line is section
- Prev by Date: Re: [PATCH v2 02/18] Add a new builtin: branch-diff
- Next by Date: Re: [PATCH v2 00/18] Add `branch-diff`, a `tbdiff` lookalike
- Previous by thread: Re: [bug] Multiline value should error if the next line is section
- Next by thread: Re: [bug] Multiline value should error if the next line is section
- Index(es):