From: Daniel <mjucde@o2.pl>
To: "Jeff King" <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: Which dates 'git log --since= --after=' compare?
Date: Tue, 20 Oct 2009 11:35:35 +0200 [thread overview]
Message-ID: <16ee5f3.236584ce.4add8467.a19be@o2.pl> (raw)
In-Reply-To: <20091020083703.GA14740@coredump.intra.peff.net>
Jeff King <peff@peff.net> wrote:
> On Mon, Oct 19, 2009 at 12:01:49PM +0200, Daniel wrote:
>
> > I can see that 'git log --since= --after=' compares commit's dates,
> > not author's dates.How can I limit commits by Author's date?
>
> AFAIK, there is currently no way to do it with a simple option. In fact,
> we don't even parse the author date when doing revision limiting.
>
> So it would need a patch, but the "obvious" solution of just parsing and
> storing the author date in a "struct commit" might not be acceptable; as
> I recall, some performance tuning went into keeping the per-commit
> memory footprint as small as possible, which had a noticeable speed
> benefit (I'm not saying it couldn't be done, but care needs to be taken
> in that regard).
>
> If it's not something you need to do often, I'd consider something like:
>
> git log --format='%H %at' |
> perl -ane '
> BEGIN {
> use DateTime::Format::Natural;
> $max_age = DateTime::Format::Natural->new->parse_datetime(
> "last friday"
> )->epoch;
> }
> print $F[0], "\n" if $F[1] < $max_age;
> '
>
> Of course that's awful to type, and it will be much slower than git
> doing the revision limiting itself.
>
> -Peff
Thanks.
prev parent reply other threads:[~2009-10-20 9:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-19 10:01 Which dates 'git log --since= --after=' compare? Daniel
2009-10-20 8:37 ` Jeff King
2009-10-20 9:35 ` Daniel [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=16ee5f3.236584ce.4add8467.a19be@o2.pl \
--to=mjucde@o2.pl \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/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).