From: Teemu Likonen <tlikonen@iki.fi>
To: Miklos Vajna <vmiklos@frugalware.org>
Cc: git@vger.kernel.org
Subject: Re: Why does "git log --reverse -1" print the HEAD commit?
Date: Sat, 31 May 2008 17:33:27 +0300 [thread overview]
Message-ID: <20080531143327.GA4121@mithlond.arda.local> (raw)
In-Reply-To: <20080531142408.GL29404@genesis.frugalware.org>
Miklos Vajna wrote (2008-05-31 16:24 +0200):
> On Sat, May 31, 2008 at 05:11:02PM +0300, Teemu Likonen
> <tlikonen@iki.fi> wrote:
> > It feels wrong that "git log -1" and "git log --reverse -1" both
> > print the same commit: HEAD. Why is that?
> >
> > Since "git log --reverse" starts from the bottom I'd have expected
> > "-1" to print one commit from the bottom.
>
> -1 limits the commit list to one element and then it prints that range
> in reverse order, which is the same for a single commit.
Oh yeah, that's the logic, thanks. I find it counter-intuitive but I'll
survive.
prev parent reply other threads:[~2008-05-31 14:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-31 14:11 Why does "git log --reverse -1" print the HEAD commit? Teemu Likonen
2008-05-31 14:24 ` Miklos Vajna
2008-05-31 14:33 ` Teemu Likonen [this message]
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=20080531143327.GA4121@mithlond.arda.local \
--to=tlikonen@iki.fi \
--cc=git@vger.kernel.org \
--cc=vmiklos@frugalware.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).