repo: Fix backwards timestamp in ostree_repo_write_commit()

ostree_repo_write_commit_with_time() converts the timestamp to
big-endian byte order.

ostree_repo_write_commit() was also doing this when calling
ostree_repo_write_commit_with_time(), resulting in a corrupted
commit object (timestamp bytes were backwards).

Recent regression in 14ffd7022a8c840f277c81e53864be4ea5fabacb
This commit is contained in:
Matthew Barnes 2015-12-03 12:01:38 -05:00
parent a02174b0ba
commit 94bc9765d5

View File

@ -1978,7 +1978,7 @@ ostree_repo_write_commit (OstreeRepo *self,
body,
metadata,
root,
GUINT64_TO_BE (g_date_time_to_unix (now)),
g_date_time_to_unix (now),
out_commit,
cancellable,
error);