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

[PATCH 0/3] revision: handle pseudo-opts in `--stdin` mode

From
Patrick Steinhardt <ps@pks.im>
Date
Jun 14, 2023, 12:18 UTC
Message-ID
<cover.1686744685.git.ps@pks.im>
Hi,

both git-rev-list(1) and git-log(1) provide a `--stdin` mode that will cause these commands to read additional commits from standard input. The primary usecase will typically be scripts that potentially process a long list of commits which might otherwise bust command line length limits.

One notable omission though is that this mode does not allow us to pass pseudo-options like `--all`, `--branch`, `--glob=` or `--not`. And while it is possible to mix command line arguments and `--stdin` in order to mix both pseudo-options and a potentially large set of commits, the end result is arguably more complex for the user.

This patch series thus implements support for handling pseudo-options in `--stdin` mode for both git-rev-list(1) and git-log(1).

Patrick
Patrick Steinhardt (3):
  revision: reorder `read_revisions_from_stdin()`
  revision: small readability improvement for reading from stdin
  revision: handle pseudo-opts in `--stdin` mode
 Documentation/rev-list-options.txt |  9 ++--
 revision.c                         | 76 +++++++++++++++++-------------
 t/t6017-rev-list-stdin.sh          | 32 +++++++++++++
 3 files changed, 79 insertions(+), 38 deletions(-)
-- 
2.41.0
Next: Patrick Steinhardt
Message 1 of 12 in “revision: handle pseudo-opts in `--stdin` mode”
  1. 0/3 revision: handle pseudo-opts in `--stdin` modePatrick Steinhardt, Jun 14, 2023
  2. 1/3 revision: reorder `read_revisions_from_stdin()`Patrick Steinhardt, Jun 14, 2023
  3. Junio C HamanoJun 14, 2023
  4. 2/3 revision: small readability improvement for reading from stdinPatrick Steinhardt, Jun 14, 2023
  5. Junio C HamanoJun 14, 2023
  6. 3/3 revision: handle pseudo-opts in `--stdin` modePatrick Steinhardt, Jun 14, 2023
  7. Junio C HamanoJun 14, 2023
  8. Patrick SteinhardtJun 15, 2023
  9. 0/3 revision: handle pseudo-opts in `--stdin` modePatrick Steinhardt, Jun 15, 2023
  10. 1/3 revision: reorder `read_revisions_from_stdin()`Patrick Steinhardt, Jun 15, 2023
  11. 3/3 revision: handle pseudo-opts in `--stdin` modePatrick Steinhardt, Jun 15, 2023
  12. 2/3 revision: small readability improvement for reading from stdinPatrick Steinhardt, Jun 15, 2023

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.