Note that there are some explanatory texts on larger screens.

plurals
  1. POHow does `git log --since` count?
    text
    copied!<p>I have a simple test repository with just several commits and want to see the date&amp;time filtered log:</p> <pre> $ git log --author="automatix" --since="2013-01-30" --pretty -- test commit ea0719bef142659fa561c9d040b2120012ed0184 Date: Thu Jan 31 02:03:12 2013 +0100 commit ab4a8387bc4d9bdb4f67212df77eb1fc3d8b6304 Date: Thu Jan 31 01:59:11 2013 +0100 commit a0b027beba2cd03571bb9475b9db9542f8efe990 Date: Thu Jan 31 01:50:38 2013 +0100 commit add77c8fe2ba9254c11b98e14facede3420dc51c Date: Thu Jan 31 01:48:34 2013 +0100 commit e6e323c05d37c74fcabeb9186b95c0d49b862e6f Date: Thu Jan 31 01:46:27 2013 +0100 commit 8c286391e54d3fc1e210950b1320fd6f013a8f84 Date: Thu Jan 31 01:41:27 2013 +0100 commit 9c880595e57f717383796fa2940f41f0f42f7e2a Date: Thu Jan 31 01:38:17 2013 +0100 commit a95527f36a533e1ecba1aadceea31a9dcbe1a8db Date: Thu Jan 31 01:30:00 2013 +0100 </pre> <p>The first selected commit is <code>a95527f36a533e1ecba1aadceea31a9dcbe1a8db</code> from <code>2013-01-30 01:30:00</code>. 8 commits are selected:</p> <pre> $ git log --author="automatix" --since="2013-01-30" --format=oneline -- test | wc 8 34 498 </pre> <p>OK. Now I select since <code>2013-01-31</code>:</p> <pre> $ git log --author="automatix" --since="2013-01-31" --format=oneline -- test | wc 0 0 0 </pre> <p>What? Ok, that should mean, that the <code>since</code> rule <em>excludes</em> the commits of the startdate. Right?</p> <p>But let's go on:</p> <pre>$ git log --author="automatix" --since="2013-01-31 01:30:00" --pretty -- test commit ea0719bef142659fa561c9d040b2120012ed0184 Date: Thu Jan 31 02:03:12 2013 +0100 commit ab4a8387bc4d9bdb4f67212df77eb1fc3d8b6304 Date: Thu Jan 31 01:59:11 2013 +0100 commit a0b027beba2cd03571bb9475b9db9542f8efe990 Date: Thu Jan 31 01:50:38 2013 +0100 commit add77c8fe2ba9254c11b98e14facede3420dc51c Date: Thu Jan 31 01:48:34 2013 +0100 commit e6e323c05d37c74fcabeb9186b95c0d49b862e6f Date: Thu Jan 31 01:46:27 2013 +0100 commit 8c286391e54d3fc1e210950b1320fd6f013a8f84 Date: Thu Jan 31 01:41:27 2013 +0100 commit 9c880595e57f717383796fa2940f41f0f42f7e2a Date: Thu Jan 31 01:38:17 2013 +0100 commit a95527f36a533e1ecba1aadceea31a9dcbe1a8db Date: Thu Jan 31 01:30:00 2013 +0100 </pre> <pre>$ git log --author="automatix" --since="2013-01-31 01:30:00" --format=oneline -- test | wc 8 34 498 </pre> <p>Now, when I'm writing the starttime as well, the commits of the starttime are <em>included</em> .</p> <p>I don't understand the logic. Can anybody explain, why it works so strange?</p> <p>Thanks</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload