git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Wang, Lei" <lei4.wang@intel.com>
Cc: git@vger.kernel.org
Subject: Re: [Bug Report] The since date of "git log" will have influence on the until date of it.
Date: Thu, 21 Jul 2022 21:12:32 -0700	[thread overview]
Message-ID: <xmqqwnc5dbv3.fsf@gitster.g> (raw)
In-Reply-To: <6cfda280-44bb-cdcc-a6fb-e0e4795edc65@intel.com> (Lei Wang's message of "Fri, 22 Jul 2022 10:39:52 +0800")

"Wang, Lei" <lei4.wang@intel.com> writes:

> The since date of "git log --since" will have influence on the until
> date of it.
>
> How to reproduce?
>
> 1. clone this repo https://erol.kernel.org/lkml/git/8/
> 2. run "git log --since="2020-05-30" --until="2020-06-02"", it won't
>    output anything
> 3. change the since date to 2020-05-29: run "git log
>    --since="2020-05-29" --until="2020-06-02""
> 4. it will output the commits in 2020-06-02 (The until date)
>
> Why would that happen, I just change the since date from 2020-05-30 to
> 2020-05-29, why it suddenly output the commits in 2020-06-02?

Perhaps there are clock skews in the history recorded in the
repository?  IOW, some commits have committer dates that are older
than those of their ancestors?

For example, if you had a commit that has committer date of June 1st
noon, and one of its children has committer date of May 29th noon,
starting the history traversal from that misdated child and saying
"I don't want to see commits before May 30th midnight, so stop the
traversal immediately if you see a commit with timestamp older than
that" with "--since=May.30th", the traversal stops even before the
misdated child is shown.  If you shift the cut-off date and ask to
stop at May 29th midnight, then the misdated child is newer than
that cut-off date and would be shown, and its parent, which has the
date of June 1st, would also be shown.


  reply	other threads:[~2022-07-22  4:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-22  2:39 [Bug Report] The since date of "git log" will have influence on the until date of it Wang, Lei
2022-07-22  4:12 ` Junio C Hamano [this message]
2022-07-22  4:34   ` Wang, Lei

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=xmqqwnc5dbv3.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=lei4.wang@intel.com \
    /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).