1

Reference the answer at https://stackoverflow.com/a/19987337/257924 to the question of How do I view all commits for a specific day?

What is the value of HH:MM:SS referenced below that would make the output of the following command be true across all git repositories regardless of history and content:

git log --since='2019-12-25'          --until='2019-12-26 00:00:00'
git log --since='2019-12-25 HH:MM:SS' --until='2019-12-26 00:00:00'

I ask because the man-page for git-log does not provide that detail (or I missed it).

TL;DR Experiment

Try this on your own git repos, and be as baffled by the output as I am by the fact that all of the one after the first combination yield differences in git log output:

$ for x in "" "00:00:00" "23:59:59"
do
  for y in "" "00:00:00" "23:59:59"
  do
    printf "x %-10s y %-10s --> " "<$x>" "<$y>"
    diff <(git log --since=2019-12-25 --until=2019-12-26 | sha1sum) <(git log --since="2019-12-25 $x" --until="2019-12-26 $y" | sha1sum) | wc -l
  done
done
x <>         y <>         --> 0
x <>         y <00:00:00> --> 4
x <>         y <23:59:59> --> 4
x <00:00:00> y <>         --> 4
x <00:00:00> y <00:00:00> --> 4
x <00:00:00> y <23:59:59> --> 4
x <23:59:59> y <>         --> 4
x <23:59:59> y <00:00:00> --> 4
x <23:59:59> y <23:59:59> --> 4
$ 

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.