git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Spang <spang@google.com>
To: Johannes Sixt <j6t@kdbg.org>
Cc: git@vger.kernel.org, "Junio C. Hamano" <gitster@pobox.com>
Subject: Re: [PATCH] Fix git rev-list --reverse --max-count=N
Date: Wed, 27 Jan 2010 17:21:47 -0500	[thread overview]
Message-ID: <abef960f1001271421s6c0f72f7xd2697ab34b53d1ea@mail.gmail.com> (raw)
In-Reply-To: <201001272309.26054.j6t@kdbg.org>

On Wed, Jan 27, 2010 at 5:09 PM, Johannes Sixt <j6t@kdbg.org> wrote:
> On Mittwoch, 27. Januar 2010, Michael Spang wrote:
>
> So when you have this history (A is oldest, D is newest):
>
>   A--B--C--D
>
> and you say
>
>   git log --max-count=2 --reverse D
>
> then you want
>
>   A
>   B
>
> but I want
>
>   C
>   D
>
> Why is your interpretation correct, an mine wrong?

Perhaps not wrong, but for me it was unexpected. For whatever reason,
I expected "--reverse" to give you the illusion that you are iterating
from the beginning of the history, even if it's not actually possible
to iterate that way directly. In line with that, limiting the output
to N commits would give you the earliest N commits. If you instead
think "stop descending through the history once we have N commits" the
current behavior makes sense.

I talked to Junio and he says the current behavior is here to stay.

Michael

  parent reply	other threads:[~2010-01-27 22:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-27 20:03 [PATCH] Fix git rev-list --reverse --max-count=N Michael Spang
2010-01-27 22:09 ` Johannes Sixt
2010-01-27 22:17   ` Sverre Rabbelier
2010-01-27 22:21   ` Michael Spang [this message]
2010-01-27 22:28   ` Junio C Hamano
2010-01-27 22:51     ` Michael Spang

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=abef960f1001271421s6c0f72f7xd2697ab34b53d1ea@mail.gmail.com \
    --to=spang@google.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j6t@kdbg.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).