Re: Support for --stdin-paths in commit, add, etc
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Aug 2, 2019, 11:40 UTC
- Message-ID
- <nycvar.QRO.7.76.6.1908021335250.46@tvgsbejvaqbjf.bet>
- In-Reply-To
- <f35fe280-2e26-f719-4030-faf261bc9a22@syntevo.com>
Hi Alexandr,
On Thu, 1 Aug 2019, Alexandr Miloslavskiy wrote:
Show 10 quoted lines
> On 01.08.2019 22:45, Junio C Hamano wrote: > > That does not mean that any patch along that line will automatically > > be accepted, of course, so the answer to "am I ready to accept" > > question is a definite no. No, I am not ready---we will have to > > look at the actual patches before deciding. > > That's why I previously mentioned "good enough" patches :) > > Thanks for your time! I guess we'll start with a patch for 'git commit' > and see how it goes.
From past experience, I find that it is important to also implement the `-z` option (which traditionally means: accept items via the command line that are delimited by NULs).
And you might find inspiration in my patch to read the paths passed to `git reset` from stdin: https://github.com/gitgitgadget/git/pull/133/commits/1db4ef0ec1ec
I guess you could use a similar approach just after the `parse_pathspec()` call in `prepare_index()`: https://github.com/gitgitgadget/git/blob/1db4ef0ec1ec/builtin/commit.c#L339-L342
Ciao, Johannes