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@xxxxxxxxx> 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.