Re: [PATCH] rev-parse: fix --verify to error out when passed junk after a good rev

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

 



Christian Couder <chriscool@xxxxxxxxxxxxx> writes:

> Before this patch something like:
>
> $ git rev-parse --verify <good-rev> <junk>
>
> worked whatever junk was as long as <good-rev> could be parsed
> correctly.
>
> This patch makes "git rev-parse --verify" error out when passed
> any junk after a good rev.
>
> Signed-off-by: Christian Couder <chriscool@xxxxxxxxxxxxx>
> ---
>  builtin-rev-parse.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> 	With this patch something like:
>
> 	$ git rev-parse --verify <good1> <good2>
>
> 	will still fail.

I think this should fail.

I've long thought that ideally giving anything but a single good rev to
"rev-parse --verify" should fail before spitting anything out.  This, like
other reponses to errorneous inputs, were what we considered of lower
priority in early days of git (think "before the end of 2005"), because we
had many other "better and more urgent" things to worry about.  I think we
have long passed that stage.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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