Re: Support for --stdin-paths in commit, add, etc
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Aug 2, 2019, 14:47 UTC
- Message-ID
- <nycvar.QRO.7.76.6.1908021641200.46@tvgsbejvaqbjf.bet>
- In-Reply-To
- <ed45493e-2a99-1137-cdf1-9a14b9c3bf7e@syntevo.com>
Hi Alexandr,
On Fri, 2 Aug 2019, Alexandr Miloslavskiy wrote:
Show 9 quoted lines
> On 02.08.2019 13:33, Johannes Schindelin wrote: > > to teach `git reset` an `--stdin` option: > > I think it should be changed to follow the approach decided > here [1] - that is, use '--paths-file', and '--paths-file -' > will mean "from stdin" > > [1] > https://public-inbox.org/git/a6610e94-6318-b962-5dd0-ca379def3bba@syntevo.com/
I am actually not sure about that. The use case I have for `git reset --stdin` is an IDE which wants to bulk-reset paths (and runs into command-line limitations without `--stdin`!), and definitely does *not* want to write a file.
So I _really_ do not need `--paths-file`, and I doubt that anybody else needs it.
Besides...
-- snip -- $ git grep -l -e --stdin v2.23.0-rc0 -- Documentation/git-\*.txt v2.23.0-rc0:Documentation/git-check-attr.txt v2.23.0-rc0:Documentation/git-check-ignore.txt v2.23.0-rc0:Documentation/git-check-mailmap.txt v2.23.0-rc0:Documentation/git-checkout-index.txt v2.23.0-rc0:Documentation/git-cherry-pick.txt v2.23.0-rc0:Documentation/git-commit-graph.txt v2.23.0-rc0:Documentation/git-diff-tree.txt v2.23.0-rc0:Documentation/git-fetch-pack.txt v2.23.0-rc0:Documentation/git-hash-object.txt v2.23.0-rc0:Documentation/git-http-fetch.txt v2.23.0-rc0:Documentation/git-index-pack.txt v2.23.0-rc0:Documentation/git-ls-tree.txt v2.23.0-rc0:Documentation/git-name-rev.txt v2.23.0-rc0:Documentation/git-notes.txt v2.23.0-rc0:Documentation/git-rev-list.txt v2.23.0-rc0:Documentation/git-send-pack.txt v2.23.0-rc0:Documentation/git-svn.txt v2.23.0-rc0:Documentation/git-update-index.txt v2.23.0-rc0:Documentation/git-update-ref.txt
-- snap --
So. Lots of precedent. Conversely:
-- snip -- $ git grep -l -e --paths v2.23.0-rc0 -- Documentation/git-\*.txt
-- snap --
Zilch. So I find the advice you received, let's say, interesting.
In `git hash-object`, where it isn't obvious whether you would want to pass in options or paths via stdin, there seems to be `--stdin-paths`. I am open to that.
I am not open to implementing `--paths` nor `--paths-file` in `git reset`.
Ciao, Johannes