Note that there are some explanatory texts on larger screens.

plurals
  1. POgit ignores $GIT_AUTHOR_DATE -- is this a bug?
    primarykey
    data
    text
    <blockquote> <p><strong>EDIT</strong>: <em>Summary</em>: Git does not allow dates before 1973/03/03 09:46:40 (epoch+100000000s) given in its "internal date format" (seconds since the epoch). This is to allow "20110224" as short form of "2011-02-24". -- <em>This Is no bug</em>: Not really, but it is not documented as well. -- <em>Workaround</em>: Do not rely on the git internal date when you cannot. -- <em>Thanks to</em>: hobbs</p> </blockquote> <p>Hi all,</p> <p>I have some issues with git filter-branch that I have tracked down to git commit-tree. Consider this script:</p> <pre><code>#!/bin/bash # please run these commands in an empty directory # (should not destroy an existing repo, though. I think it would only # a few dangling objects) set -e -o pipefail git init tree=$(git write-tree) commit=$(echo "my first commit -- the tree is empty" | env GIT_AUTHOR_DATE="0 +0000" git commit-tree $tree) echo "This is commit $commit:" git cat-file commit $commit </code></pre> <p>Note that the <code>env GIT_AUTHOR_DATE="0 +0000"</code> sets the date using the "Git internal format" -- see git-commit-tree's manpage for details -- to 1970-01-01.</p> <p>But the output of this script (the raw commit) is</p> <pre><code>tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904 author Jane Doe &lt;jane&gt; 1298477214 +0100 committer Jane Doe &lt;jane&gt; 1298477214 +0100 my first commit -- the tree is empty </code></pre> <p>Now <strong>why is git ignoring $GIT_AUTHOR_DATE?</strong> If that is of significance, my <code>git --version</code> gives <code>git version 1.7.1</code>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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