git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [Bug Report] The since date of "git log" will have influence on the until date of it.
@ 2022-07-22  2:39 Wang, Lei
  2022-07-22  4:12 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Wang, Lei @ 2022-07-22  2:39 UTC (permalink / raw)
  To: git

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?

-- 
BR,
Lei


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Bug Report] The since date of "git log" will have influence on the until date of it.
  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
  2022-07-22  4:34   ` Wang, Lei
  0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2022-07-22  4:12 UTC (permalink / raw)
  To: Wang, Lei; +Cc: git

"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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Bug Report] The since date of "git log" will have influence on the until date of it.
  2022-07-22  4:12 ` Junio C Hamano
@ 2022-07-22  4:34   ` Wang, Lei
  0 siblings, 0 replies; 3+ messages in thread
From: Wang, Lei @ 2022-07-22  4:34 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

Is the git log process involving some random methods? I tested the same 
command of the same repo with the same git version (37.1) on two 
different machines (i.e., just the machine is different), but the output 
is totally different...

BR,
Lei

On 7/22/2022 12:12 PM, Junio C Hamano wrote:
> "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.
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-07-22  4:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2022-07-22  4:34   ` Wang, Lei

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).