Re: [PATCHv5 16/16] Introduce portable_unset and use it to ensure proper && chaining

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

 



On Sun, Oct 3, 2010 at 8:51 AM, Jonathan Nieder <jrnieder@xxxxxxxxx> wrote:
> I think this should read
>
> Â Â Â Âportable_unset () {
> Â Â Â Â Â Â Â Âunset "$@"
> Â Â Â Â Â Â Â Âreturn 0
> Â Â Â Â}
>
> (or || true). ÂThat is, if I try
>
> Â Â Â Âportable_unset "foo bar"
>
> then on platforms where an envvar named "foo bar" is allowed,
> this should unset it, no?
>
> Also, maybe a comment could guide people in using this:
>
> Â Â Â Â# In some bourne shell implementations, the "unset" builtin
> Â Â Â Â# returns nonzero status when a variable to be unset was not
> Â Â Â Â# set in the first place.
> Â Â Â Â#
> Â Â Â Â# Use portable_unset when that should not be considered an
> Â Â Â Â# error.
>
> An update to t/README would be nice, too. :)

Yes, all the above sounds good, as does your other changes on this
series that I didn't yet comment on; I made the relevant changes for
all these comments.  Thanks!
--
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]