Re: [PATCH] buitin_config: return postitive status in get_value

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

 



On 28 July 2012 15:59, Nguyen Thai Ngoc Duy <pclouds@xxxxxxxxx> wrote:
> I'm curious. Why is -1 (or 255) wrong? It was introduced in the first
> version of get_value in 4ddba79 (git-config-set: add more options -
> 2005-11-20). Back then it returned -1 when there's regex compile error
> to distinguish with 0 and 1 (but git-config-set.txt in the same commit
> did not get update about exit code). Maybe we should update document
> instead of the code.
> --
> Duy

That sounds great.
But the behavior now seems kind of strange, or maybe I'm missing something:
# git config foobar; echo $?
error: key does not contain a section: foobar
255

# git config foobar.info; echo $?
1

git version 1.7.11.2

I would generally expect the both to behave the same way.
--
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]