From: Alexandr Miloslavskiy Date: Fri, 02 Aug 2019 11:44:03 GMT Subject: Re: Support for --stdin-paths in commit, add, etc Message-ID: <7edb3b11-054c-81a9-d88e-7e2325ad813f@syntevo.com> In-Reply-To: @Johannes, thanks a lot for your tips! On 02.08.2019 13:40, Johannes Schindelin wrote: > 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