On 9/5/2013 5:23 PM, Junio C Hamano wrote:
> Brad King writes:
>> create SP NUL NUL
>> update SP NUL NUL [] NUL
>
> That SP in '-z' format looks strange. Was there a reason why NUL
> was inappropriate?
The precedent I saw in the -z survey I posted is that NUL is used
to terminate
Brad King writes:
> On 09/04/2013 05:27 PM, Junio C Hamano wrote:
>> I am not saying the above is the best format, but the point is that
>> the mode of the operation defines the structure
>
> Great, thanks for your comments. Based on that I've prototyped a
> new format. Rather than jumping stra
On 09/04/2013 05:27 PM, Junio C Hamano wrote:
> I am not saying the above is the best format, but the point is that
> the mode of the operation defines the structure
Great, thanks for your comments. Based on that I've prototyped a
new format. Rather than jumping straight to the patch, here is my
Brad King writes:
> Nothing else uses LF NUL. I chose it as a starting point for
> this very discussion, which I asked about in $gmane/233653.
The primary reason why LF raised my eyebrow was because the reason
why many subcommands use "-z" (and NUL) is often because the payload
may have LF in a
On 09/04/2013 02:23 PM, Junio C Hamano wrote:
> "whitespace-separated" implies that we may allow fields separated with not a
> single SP, but with double SPs or even HTs between them. I personally do not
> think we should be so loose
Okay, I will look at making it more strict. See proposed form
On 09/04/2013 03:17 PM, Junio C Hamano wrote:
> Brad King writes:
>> +static void update_refs_stdin_read_n()
>> +static void update_refs_stdin_read_z()
>
> These need to be defined with explicit (void) argument list.
Oops, fixed.
Thanks,
-Brad
--
To unsubscribe from this list: send the line "un
Brad King writes:
> +static void update_refs_stdin_read_n()
> +{
> + struct strbuf line = STRBUF_INIT;
> +
> + while (strbuf_getline(&line, stdin, '\n') != EOF)
> + update_refs_stdin_parse_line(line.buf);
> +
> + strbuf_release(&line);
> +}
> +
> +static void update_refs_s
Brad King 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.
"whitespace-separated" implies that we may allow fields separated
with
Add a --stdin signature to read update instructions from standard input
and apply multiple ref updates together. Use an input format that
supports any update that could be specified via the command-line,
including object names like "branch:path with space".
Signed-off-by: Brad King
---
Document
9 matches
Mail list logo