Re: [PATCH v8 2/2] interpret_trailers: for three options parse add warning

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

 



Christian Couder <christian.couder@xxxxxxxxx> 于2021年3月16日周二 下午1:53写道:
> I am not against this, but I just want to say that when I previously
> worked on `interpret-trailers` I think I implemented or suggested such
> warnings, but they were rejected.
>
> I think the reason they were rejected was to improve compatibility
> with future versions of Git where more options would be implemented.
>
> For example if in a few years someone implements `--where=middle` and
> some people use it in a script like this:
>
> git interpret-trailers --where=middle --trailer foo=bar
>
> Then when such a script would be used with a recent version of Git it
> would work well, while if it would be used with an old version of Git
> it would emit warnings. And these warnings might actually be more
> annoying than the fact that the trailer is not put in the middle.
>

Well, this is indeed a situation I did not foresee. As a user, I don't see an
error | warning reminder which may make me a little confused.

At the same time, some sub-command like `git cat-file`, If user give a wrong
format:

$  git cat-file  --batch-check="%(deltabases)"

git will tell us, "fatal: unknown format element: deltabases".
It's easy for user to check.

> I might be wrong and there might have been other reasons though. Also
> things might have changed since that time, as not many options if any
> have been added since then.

Thanks for your patiently explanation.
If these warnings are really unnecessary, I will drop this patch.




[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