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

Re: Back-dating commits--way back--for constitution.git

From
Jakub Narebski <jnareb@gmail.com>
Date
Aug 3, 2010, 13:19 UTC
Message-ID
<201008031519.11012.jnareb@gmail.com>
In-Reply-To
<20100803124831.GB11608@coredump.intra.peff.net>
On Tue, 3 Aug 2010, Jeff King wrote:
Show 20 quoted lines
> On Tue, Aug 03, 2010 at 12:02:52PM +0200, Jakub Narebski wrote:
> 
> > > Hmm, sizeof(time_t) == 8 for my x86_64 Fedora, but committing ancient
> > > times fails.
> > 
> > That's because git *porcelain* either does not use time_t consistently,
> > or has some sanity checks that are good heuristic for ordinary use (like
> > e.g. commit time not too far in past where git didn't even exists),
> > or both.
> > 
> > It is not a problem on lowest level, i.e. repository format and plumbing.
> > I was able to create a commit that had author time before Unix epoch 
> > using plumbing:
> 
> I am not sure there isn't some unportability at the lowest level. We
> freely interchange between time_t and unsigned long in the low-level
> date code. It probably happens to work because casting the bits back and
> forth between signed and unsigned types generally works, as long as you
> end up with the type that you want. But it isn't necessarily portable,
> and there can be subtle bugs. See, for example, my recent 9ba0f033.

Well, at least there is not a problem at lowest of low, i.e. repository format level, thanks to the use of textual representation for epoch.

-- 
Jakub Narebski
Poland
Previous: Jeff KingNext: Jeff King
Message 33 of 36 in “Back-dating commits--way back--for constitution.git”
  1. Joel C. SalomonAug 2, 2010
  2. Shawn O. PearceAug 2, 2010
  3. Joel C. SalomonAug 2, 2010
  4. Ævar Arnfjörð BjarmasonAug 2, 2010
  5. Joel C. SalomonAug 4, 2010
  6. Ævar Arnfjörð BjarmasonAug 4, 2010
  7. Joel C. SalomonAug 5, 2010
  8. Ævar Arnfjörð BjarmasonAug 5, 2010
  9. Sverre RabbelierAug 5, 2010
  10. Jakub NarebskiAug 6, 2010
  11. Michael WittenAug 6, 2010
  12. Sverre RabbelierAug 6, 2010
  13. Joel C. SalomonAug 6, 2010
  14. Ævar Arnfjörð BjarmasonAug 6, 2010
  15. Joel C. SalomonAug 6, 2010
  16. Brandon CaseyAug 6, 2010
  17. Ævar Arnfjörð BjarmasonAug 6, 2010
  18. Brandon CaseyAug 6, 2010
  19. Joel C. SalomonAug 8, 2010
  20. Joshua JuranAug 8, 2010
  21. Jakub NarebskiAug 2, 2010
  22. Junio C HamanoAug 2, 2010
  23. Jakub NarebskiAug 3, 2010
  24. Jakub NarebskiAug 3, 2010
  25. Michael J GruberAug 3, 2010
  26. Joshua JuranAug 3, 2010
  27. Jeff KingAug 3, 2010
  28. Joshua JuranAug 3, 2010
  29. Jeff KingAug 3, 2010
  30. Jakub NarebskiAug 3, 2010
  31. Jakub NarebskiAug 3, 2010
  32. Jeff KingAug 3, 2010
  33. Jakub NarebskiAug 3, 2010
  34. Jeff KingAug 3, 2010
  35. Michael J GruberAug 3, 2010
  36. Jeff KingAug 3, 2010

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.