git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

Previous: Alexandr MiloslavskiyNext: Alexandr Miloslavskiy
Message 14 of 23 in “Support for --stdin-paths in commit, add, etc”
  1. Alexandr MiloslavskiyJul 31, 2019
  2. Junio C HamanoJul 31, 2019
  3. Jeff KingJul 31, 2019
  4. Junio C HamanoJul 31, 2019
  5. Alexandr MiloslavskiyAug 1, 2019
  6. Phillip WoodAug 1, 2019
  7. Junio C HamanoAug 1, 2019
  8. Alexandr MiloslavskiyAug 1, 2019
  9. Johannes SchindelinAug 2, 2019
  10. Alexandr MiloslavskiyAug 2, 2019
  11. Johannes SchindelinAug 2, 2019
  12. Alexandr MiloslavskiyAug 2, 2019
  13. Alexandr MiloslavskiyAug 2, 2019
  14. Johannes SchindelinAug 2, 2019
  15. Alexandr MiloslavskiyAug 2, 2019
  16. René ScharfeAug 1, 2019
  17. Alexandr MiloslavskiyAug 1, 2019
  18. Junio C HamanoAug 1, 2019
  19. Alexandr MiloslavskiyAug 1, 2019
  20. Junio C HamanoAug 1, 2019
  21. Alexandr MiloslavskiyAug 1, 2019
  22. Johannes SchindelinAug 2, 2019
  23. Alexandr MiloslavskiyAug 2, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.