Re: [PATCH v2 7/8] update-ref: support multiple simultaneous updates

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

 



On 08/30/2013 06:51 PM, Junio C Hamano wrote:
> Brad King <brad.king@xxxxxxxxxxx> writes:
>> +With `--stdin`, update-ref reads instructions from standard input and
>> +performs all modifications together.  Empty lines are ignored.
>> +Each non-empty line is parsed as whitespace-separated arguments.
>> +Use single-quotes to enclose whitespace and backslashes and an
>> +unquoted backslash to escape a single quote.
> 
> That is somewhat unusual.
> 
> When we need to deal with arbitrary strings (like pathnames), other
> parts of the system usually give the user two interfaces, --stdin
> with and without -z, and the strings are C-quoted when run without
> the -z option, and terminated with NUL when run with the -z option.

Great, this was the kind of suggestion I was looking for in the original
PATCH/RFC cover letter.  Thanks.  I'll start with the C-quoted version
and think about adding -z once we've agreed on that format.

>> +Specify updates with
>> +lines of the form:
>> +
>> +	[--no-deref] [--] <ref> <newvalue> [<oldvalue>]
> 
> What is -- doing here?  refs given to update-ref begin with refs/
> (otherwise it is HEAD), no?

The existing update-ref command line can be used to create all kinds
of refs, even starting in "-".  I didn't want to add any restriction
in the stdin format.  I'm not opposed to it though.

Thanks,
-Brad
--
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]