git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Possibly a bug
@ 2013-11-17  2:59 Jiergir Ogoerg
  2013-11-17  9:49 ` Jeff King
  0 siblings, 1 reply; 2+ messages in thread
From: Jiergir Ogoerg @ 2013-11-17  2:59 UTC (permalink / raw)
  To: git

Hi,
As suggested by the git book/tutorial I cloned "simplegit-progit" to
learn using git.
The issue:
git log --since=5.years
yields 2 commits, while
git log --since=6.years
yields 3 commits, despite the "Date" in both cases being March 2008.
Is it a bug?

Using Fedora 20 amd64 with git version 1.8.4.2


Details:
//==> FIVE YEARS
simplegit-progit$ git log --since=5.years
commit ca82a6dff817ec66f44342007202690a93763949
Author: Scott Chacon <schacon@gmail.com>
Date:   Mon Mar 17 21:52:11 2008 -0700

    changed the verison number

commit 085bb3bcb608e1e8451d4b2432f8ecbe6306e7e7
Author: Scott Chacon <schacon@gmail.com>
Date:   Sat Mar 15 16:40:33 2008 -0700

    removed unnecessary test code
//<== FIVE YEARS

//==> SIX YEARS
simplegit-progit$ git log --since=6.years
commit ca82a6dff817ec66f44342007202690a93763949
Author: Scott Chacon <schacon@gmail.com>
Date:   Mon Mar 17 21:52:11 2008 -0700

    changed the verison number

commit 085bb3bcb608e1e8451d4b2432f8ecbe6306e7e7
Author: Scott Chacon <schacon@gmail.com>
Date:   Sat Mar 15 16:40:33 2008 -0700

    removed unnecessary test code

commit a11bef06a3f659402fe7563abf99ad00de2209e6
Author: Scott Chacon <schacon@gmail.com>
Date:   Sat Mar 15 10:31:28 2008 -0700

    first commit
//<== SIX YEARS

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

* Re: Possibly a bug
  2013-11-17  2:59 Possibly a bug Jiergir Ogoerg
@ 2013-11-17  9:49 ` Jeff King
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff King @ 2013-11-17  9:49 UTC (permalink / raw)
  To: Jiergir Ogoerg; +Cc: git

On Sun, Nov 17, 2013 at 04:59:20AM +0200, Jiergir Ogoerg wrote:

> As suggested by the git book/tutorial I cloned "simplegit-progit" to
> learn using git.
> The issue:
> git log --since=5.years
> yields 2 commits, while
> git log --since=6.years
> yields 3 commits, despite the "Date" in both cases being March 2008.
> Is it a bug?

No, but it is confusing.

The `--since` and `--until` flags use the committer date, not the author
date. Try `git log --pretty=fuller`, and you will see that the author
and committer dates do not match for the top two commits (their
committer date is within 5 years).

Usually the two dates are the same, but they can be different if a
commit is rebased, or applied via patch.

-Peff

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

end of thread, other threads:[~2013-11-17  9:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-17  2:59 Possibly a bug Jiergir Ogoerg
2013-11-17  9:49 ` Jeff King

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 NNTP newsgroup(s).