Re: [bug] Multiline value should error if the next line is section

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Shulhan

Thank you for your report. I'm abbreviating a bit:

On 6 May 2018 at 21:03, Shulhan <ms@xxxxxxxxxxxx> wrote:
> [alias]
>         tree = --no-pager log --graph \
>                 -n 20 \
> [user]
>         name = Shulhan
>
> (2) Run `git config -f git.config -l`
>
> The command print the following output,
>
> alias.tree=--no-pager log --graph -n 20 [user]
> alias.name=Shulhan

Small mistake, big consequences. :-)

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.

Martin



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux