git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael J Gruber <git@drmicha.warpmail.net>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: --max-count useless with git-rev-list's --reverse
Date: Tue, 08 Mar 2011 09:30:36 +0100	[thread overview]
Message-ID: <4D75E92C.1090506@drmicha.warpmail.net> (raw)
In-Reply-To: <AANLkTikpK-r_kdqCEPwpqEgENtwgUrZDLwZnuS2QMdH=@mail.gmail.com>

Ævar Arnfjörð Bjarmason venit, vidit, dixit 07.03.2011 20:17:
> On git.git, this works as expected, gives me the first 3 commits:
> 
>    $ git rev-list --reverse origin/master | head -n 3
>     e83c5163316f89bfbde7d9ab23ca2e25604af290
>     8bc9a0c769ac1df7820f2dbf8f7b7d64835e3c68
>     e497ea2a9b6c378f01d092c210af20cbee762475
> 
> Why is this so useless about ignoring the --reverse option, is this my
> design (these are the 3 *latest* commits):

I don't think it's your design ;)

> 
>     $ git rev-list --reverse origin/master --max-count=3
>     08fd8710e277eed73a21c6c5483c57bfeb14e8a7
>     6d74e5c9dbe71e2eb63c6e8862ec979e9a5f068b
>     07873dc5dd67398324278ff0d7627bb1a863ba89
>     $ git rev-list origin/master --max-count=3
>     07873dc5dd67398324278ff0d7627bb1a863ba89
>     6d74e5c9dbe71e2eb63c6e8862ec979e9a5f068b
>     08fd8710e277eed73a21c6c5483c57bfeb14e8a7
> 
> From the manpage:
> 
>    --reverse
>        Output the commits in reverse order. Cannot be combined with

And that's exactly what it does - built in "tac", so to say.

> --walk-reflogs.
> 
> Shouldn't --reverse be applied *before* --max-count?

We could be clearer about the order in which these options are applied,
for example by listing the option blocks in that order and pointing out
--reverse in particular, see the upcoming little (squashable series).

Cheers,
Michael

  parent reply	other threads:[~2011-03-08  8:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-07 19:17 --max-count useless with git-rev-list's --reverse Ævar Arnfjörð Bjarmason
2011-03-07 19:40 ` Shawn Pearce
2011-03-08  7:35   ` Jay Soffian
2011-03-08  8:34     ` Michael J Gruber
2011-03-08  8:30 ` Michael J Gruber [this message]
2011-03-08  8:31   ` [PATCH 1/3] rev-list-options.txt: typo fix Michael J Gruber
2011-03-08  8:31     ` [PATCH 2/3] git-log.txt,rev-list-options.txt: -n/--max-count is commit limiting Michael J Gruber
2011-03-08 19:59       ` Junio C Hamano
2011-03-09  7:11         ` Michael J Gruber
2011-03-08  8:31     ` [PATCH 3/3] git-log.txt,rev-list-options.txt: put option blocks in proper order Michael J Gruber
2011-03-09 23:38       ` Junio C Hamano
2011-03-10  7:50         ` Michael J Gruber
2011-03-08 19:56     ` [PATCH 1/3] rev-list-options.txt: typo fix Junio C Hamano
2011-03-09  7:07       ` Michael J Gruber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D75E92C.1090506@drmicha.warpmail.net \
    --to=git@drmicha.warpmail.net \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).