Phillip Wood <phillip.wood...@gmail.com> writes:

> No but it only takes paths not pathspecs, can you filter out the
> ignored paths first? From a UI point of view it would be better not to
> allow users to select ignored files if you don't want to be able to
> add them. If you want to use a pathspec then you can do 'git ls-files
> --exclude-standard -o -z <pathspec ...> | git update-index --add -z
> --stdin'
> ...
> You can use a temporary index, add the files you want to commit with
> update-index --stdin and then run 'git commit'

All true.  Perhaps we need a separate tutorial for scripters to
teach them how to properly combine the plumbing commands?

> When I've been scripting I've sometimes wished that diff-index and
> diff-files had a --stdin option.

Sounds fair.

Reply via email to