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

[PATCH] rev-list-options: clarify the usage of -n/--max-number

From
Pranit Bauva <pranit.bauva@gmail.com>
Date
Sep 27, 2016, 14:10 UTC
Message-ID
<010201576bfb6c7d-0b68228f-9503-4dd1-9721-713477fa2596-000000@eu-west-1.amazonses.com>
In-Reply-To
<201609271240.19759.sweet_f_a@gmx.de>

-n=<number>, -<number>, --max-number=<number> shows the last n commits specified in <number> irrespective of whether --reverse is used or not. With --reverse, it just shows the last n commits in reverse order.

Reported-by: Ruediger Meier <sweet_f_a@gmx.de>
Signed-off-by: Pranit Bauva <pranit.bauva@gmail.com>

--- Hey Ruegiger,

The description is a bit inappropriate for --max-count and thus this patch.

I cannot comment whether --max-count=-n would be a good choice or not
because personally I never left the need of it. I normally use --reverse
so as to review my patches in a branch serially. So for me the current
usage of --reverse seems more appropriate.
---
 Documentation/rev-list-options.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt
index 7e462d3..6b7c2e5 100644
--- a/Documentation/rev-list-options.txt
+++ b/Documentation/rev-list-options.txt
@@ -18,7 +18,7 @@ ordering and formatting options, such as `--reverse`.
 -<number>::
 -n <number>::
 --max-count=<number>::
-	Limit the number of commits to output.
+	Limit to last n number of commits to output specified in <number>.
 
 --skip=<number>::
 	Skip 'number' commits before starting to show the commit output.

--
https://github.com/git/git/pull/296
Previous: Ruediger MeierNext: Junio C Hamano
Message 2 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.