diff --git a/docs/manual/repo.md b/docs/manual/repo.md index c23a4453..6e307ba3 100644 --- a/docs/manual/repo.md +++ b/docs/manual/repo.md @@ -58,10 +58,11 @@ comparing timestamps. For Git, the logical choice is to not mess with timestamps, because unnecessary rebuilding is better than a broken tree. However, OSTree has to hardlink files to check them out, and commits are assumed to be internally consistent with no build steps needed. For this reason, OSTree -acts as though all timestamps are set to time_t 1, so that comparisons will be -considered up-to-date. 1 is a better choice than 0 because some programs use 0 -as a special value; for example, GNU Tar warns of an "implausibly old time -stamp" with 0. +acts as though all timestamps are set to time_t 0, so that comparisons will be +considered up-to-date. Note that for a few releases, OSTree used 1 to fix +warnings such as GNU Tar emitting "implausibly old time stamp" with 0; however, +until we have a mechanism to transition cleanly to 1, for compatibilty OSTree +is reverted to use zero again. # Repository types and locations diff --git a/src/libostree/ostree-repo-private.h b/src/libostree/ostree-repo-private.h index 92d8a084..e8d5550f 100644 --- a/src/libostree/ostree-repo-private.h +++ b/src/libostree/ostree-repo-private.h @@ -32,7 +32,7 @@ G_BEGIN_DECLS #define _OSTREE_SUMMARY_CACHE_DIR "summaries" #define _OSTREE_CACHE_DIR "cache" -#define OSTREE_TIMESTAMP (1) +#define OSTREE_TIMESTAMP (0) typedef enum { OSTREE_REPO_TEST_ERROR_PRE_COMMIT = (1 << 0) diff --git a/tests/basic-test.sh b/tests/basic-test.sh index c4828d90..9db56e77 100755 --- a/tests/basic-test.sh +++ b/tests/basic-test.sh @@ -392,9 +392,9 @@ else $OSTREE checkout test2 test2-checkout fi stat '--format=%Y' test2-checkout/baz/cow > cow-mtime -assert_file_has_content cow-mtime 1 +assert_file_has_content cow-mtime 0 stat '--format=%Y' test2-checkout/baz/deeper > deeper-mtime -assert_file_has_content deeper-mtime 1 +assert_file_has_content deeper-mtime 0 echo "ok content mtime" cd ${test_tmpdir}