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

question about git rev-list --max-count=n

From
Ruediger Meier <sweet_f_a@gmx.de>
Date
Sep 27, 2016, 10:40 UTC
Message-ID
<201609271240.19759.sweet_f_a@gmx.de>
Hi,
git rev-list --max-count=n

seems to always list the _last_ (newest) n commits. Is there any functionality to list the _first_ n commits?

I've tried to add --reverse hoping that this would do it but it does not.

The manual could be a bit more clear about that:
    --max-count=<number>   Limit the number of commits to output.

If it really would only limit the _output_ (like head -n), then IMO --reverse should do what I want.

Regarding my initial question. Maybe we could support
   --max-count=-n
to list the first n commits.
cu,
Rudi
  
Next: Pranit Bauva
Message 1 of 9 in “question about git rev-list --max-count=n”
  1. Ruediger MeierSep 27, 2016
  2. rev-list-options: clarify the usage of -n/--max-numberPranit Bauva, Sep 27, 2016
  3. Junio C HamanoSep 27, 2016
  4. Pranit BauvaSep 27, 2016
  5. rev-list-options: clarify the usage of --reversePranit Bauva, Sep 27, 2016
  6. Philip OakleySep 27, 2016
  7. Junio C HamanoSep 27, 2016
  8. Philip OakleySep 27, 2016
  9. Pranit BauvaSep 28, 2016

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.