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

Re: [PATCH v4] rev-list: teach --no-object-names to enable piping

From
Emily Shaffer <emilyshaffer@google.com>
Date
Jun 19, 2019, 19:31 UTC
Message-ID
<20190619193134.GF100487@google.com>
In-Reply-To
<xmqq1rzpsm5t.fsf@gitster-ct.c.googlers.com>
On Wed, Jun 19, 2019 at 07:08:14AM -0700, Junio C Hamano wrote:
Show 16 quoted lines
> Emily Shaffer <emilyshaffer@google.com> writes:
> 
> > Since v3, added a corresponding "--object-names" arg to pair with
> > "--no-object-names", and "last-one-wins" logic. Also added a test to
> > validate this new arg and the logic.
> 
> Thanks for a quick turnaround (unfortunately, I was OOO yesterday
> and I am half-sick today, so please expect slow responses---sorry
> about that).
> 
> > In adding the test, I noticed that I had left in a test about --oid-only
> > that doesn't apply after the changes from v2->v3; that test is removed.
> 
> I noticed in range-diff, too.  So now --object-names can be used
> with --pretty (not that "rev-list --pretty --objects" makes much
> sense in the first place, so no point in testing that it works).

Yeah, it works. It looks weird, but it works pretty much as you'd expect:

emilyshaffer@podkayne:~/git-second [stray-whitespace]$ tg2 rev-list
--object-names --objects --pretty=short --max-count=1 HEAD | head -n 20
commit 701c66d5f2fafe163892fa0968ce8bca041dbc92
Author: Emily Shaffer <emilyshaffer@google.com>
    rev-list: teach --no-object-names to enable piping
    d4b1d372d16aaff35b221afce017f90542fd9293 
    41d4cd23fd97f599053a19555a173894da71e560 .clang-format
    42cdc4bbfb05934bb9c3ed2fe0e0d45212c32d7a .editorconfig
emilyshaffer@podkayne:~/git-second [stray-whitespace]$ tg2 rev-list
--no-object-names --objects --pretty=short --max-count=1 HEAD | head -n
20
commit 701c66d5f2fafe163892fa0968ce8bca041dbc92
Author: Emily Shaffer <emilyshaffer@google.com>
    rev-list: teach --no-object-names to enable piping
    d4b1d372d16aaff35b221afce017f90542fd9293
    41d4cd23fd97f599053a19555a173894da71e560
    42cdc4bbfb05934bb9c3ed2fe0e0d45212c32d7a

Ah, but when I was grabbing these samples, I noticed that I didn't update the manpage for rev-list. So please wait while I reroll again... sorry!

 - Emily
Previous: Junio C HamanoNext: Jeff King
Message 19 of 22 in “revision: remove stray whitespace when name empty”
  1. revision: remove stray whitespace when name emptyEmily Shaffer, Jun 7, 2019
  2. Eric SunshineJun 8, 2019
  3. Emily ShafferJun 12, 2019
  4. Jeff KingJun 9, 2019
  5. Junio C HamanoJun 10, 2019
  6. Emily ShafferJun 12, 2019
  7. Jeff KingJun 13, 2019
  8. rev-list: teach --oid-only to enable pipingEmily Shaffer, Jun 13, 2019
  9. Jeff KingJun 14, 2019
  10. Junio C HamanoJun 14, 2019
  11. Emily ShafferJun 14, 2019
  12. Emily ShafferJun 14, 2019
  13. Jeff KingJun 19, 2019
  14. rev-list: teach --no-object-names to enable pipingEmily Shaffer, Jun 14, 2019
  15. Junio C HamanoJun 17, 2019
  16. Emily ShafferJun 18, 2019
  17. rev-list: teach --no-object-names to enable pipingEmily Shaffer, Jun 18, 2019
  18. Junio C HamanoJun 19, 2019
  19. Emily ShafferJun 19, 2019
  20. Jeff KingJun 19, 2019
  21. rev-list: teach --no-object-names to enable pipingEmily Shaffer, Jun 19, 2019
  22. Jeff KingJun 19, 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.