1

Using git --since and 8 days before, it returns commits in 20 days range

git log --all --author $USER --since "8 days ago" | grep "Date:"
Date:   Mon Dec 11 13:59:23 2017 +0300
Date:   Mon Nov 20 14:43:13 2017 +0000
Date:   Fri Dec 1 16:35:56 2017 +0300
Date:   Fri Dec 1 16:31:34 2017 +0300
Date:   Fri Dec 8 16:16:56 2017 +0300
Date:   Fri Dec 8 14:01:13 2017 +0300
Date:   Thu Dec 7 17:48:54 2017 +0300
Date:   Thu Dec 7 16:53:08 2017 +0300
Date:   Thu Dec 7 16:40:48 2017 +0300
Date:   Wed Dec 6 17:20:45 2017 +0300
Date:   Wed Dec 6 17:08:32 2017 +0300
Date:   Wed Dec 6 16:52:52 2017 +0300
Date:   Wed Dec 6 16:52:07 2017 +0300
Date:   Wed Dec 6 13:34:03 2017 +0300
Date:   Wed Dec 6 13:06:41 2017 +0300
Date:   Mon Dec 4 12:30:06 2017 +0300

Why it shows the second row (November), if today is the 11th of December?

[SOLUTION] According solution for this event, I need to use

How to get git to show commits in a specified date range for author date?

Thanks @torek for clarifying this

kAldown
  • 610
  • 2
  • 8
  • 27

1 Answers1

1

Each commit stores two dates: an "author date" and a "committer date". The --since option selects or rejects commits based on committer date stamp, while git log prints the author date stamp by default.

Add --pretty=fuller (which prints both time stamps for each selected commit) and this should become clearer.

torek
  • 448,244
  • 59
  • 642
  • 775
  • yeap, you were right. Interesting behavior `AuthorDate: Mon Nov 20 14:43:13 2017 +0000 Commit: XXX CommitDate: Mon Dec 11 11:35:14 2017 +0300`. – kAldown Dec 12 '17 at 10:46