git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Possible bug in git log with date ranges

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Apr 2, 2018, 12:17 UTC
Message-ID
<871sfxx0od.fsf@evledraar.gmail.com>
In-Reply-To
<CAFGVh0yh-w3=s5WBK-HqHQd+dWKgpnqytF4E3mXv_HxrC1i78Q@mail.gmail.com>
On Mon, Apr 02 2018, David Hoyle wrote:
Show 14 quoted lines
> Hi,
>
> Hopefully I've read the readme file correctly for submitting something
> that might be a bug.
>
> I've recently migrated projects from an old version control system
> (JEDI VCS) to Git (which I really like BTW). The way this was done was
> by extracting the files from the original database and saving them to
> a folder layout and then running git add / commit on the files. When
> using the commit command I've used the --date switch to commit the
> files using their original dates. However if I run git log with say
> --since=date it seems as if this command uses the actual date the
> commit was entered not the date given for the commit. The same seems
> to apply to the other date filtering switches.

The --date=* switch to git-commit sets the author date, but the date narrowing options to git-log use the committer date. See if when you run:

    git log --pretty=format:"%aD - %cD"

Whether what you're getting doesn't make sense in terms of the second date.

You can use GIT_COMMITTER_DATE to get what you want, see "DATE FORMATS" in git-commit(1).

Previous: David Hoyle
Message 2 of 2 in “Possible bug in git log with date ranges”
  1. David HoyleApr 2, 2018
  2. Ævar Arnfjörð BjarmasonApr 2, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.