Re: [PATCH 2/2] reset: support the --stdin option

2016-10-12 Thread Johannes Schindelin
Hi Junio, On Tue, 11 Oct 2016, Junio C Hamano wrote: > Johannes Schindelin writes: > > > + if (read_from_stdin) { > > + strbuf_getline_fn getline_fn = nul_term_line ? > > + strbuf_getline_nul : strbuf_getline_lf; > > + int

Re: [PATCH 2/2] reset: support the --stdin option

2016-10-12 Thread Johannes Schindelin
Hi Kuba, On Tue, 11 Oct 2016, Jakub Narębski wrote: > W dniu 11.10.2016 o 18:09, Johannes Schindelin pisze: > > > SYNOPSIS > > > > [verse] > > -'git reset' [-q] [] [--] ... > > +'git reset' [-q] [--stdin [-z]] [] [--] ... > > I think you meant here > > +'git reset' [-q] [--stdin

Re: [PATCH 2/2] reset: support the --stdin option

2016-10-11 Thread Jakub Narębski
W dniu 11.10.2016 o 18:09, Johannes Schindelin pisze: > SYNOPSIS > > [verse] > -'git reset' [-q] [] [--] ... > +'git reset' [-q] [--stdin [-z]] [] [--] ... I think you meant here +'git reset' [-q] [--stdin [-z]] [] Because you say "*Instead*" below. > +--stdin:: > + Instead

Re: [PATCH 2/2] reset: support the --stdin option

2016-10-11 Thread Junio C Hamano
Johannes Schindelin writes: > + if (read_from_stdin) { > + strbuf_getline_fn getline_fn = nul_term_line ? > + strbuf_getline_nul : strbuf_getline_lf; > + int flags = PATHSPEC_PREFER_FULL | > +

[PATCH 2/2] reset: support the --stdin option

2016-10-11 Thread Johannes Schindelin
Just like with other Git commands, this option makes it read the paths from the standard input. It comes in handy when resetting many, many paths at once and wildcards are not an option (e.g. when the paths are generated by a tool). Note: to keep things simple, we first parse the entire list and