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

RE: Millisecond precision in timestamps?

From
Jason Pyeron <jpyeron@pdinc.us>
Date
Nov 28, 2012, 01:29 UTC
Message-ID
<EE15DF282E7C4196A32EE0818A64E35D@black>
In-Reply-To
<20121128011750.GA23498@sigill.intra.peff.net>
Show 41 quoted lines
> -----Original Message-----
> From: Jeff King
> Sent: Tuesday, November 27, 2012 20:18
> 
> On Tue, Nov 27, 2012 at 05:07:34PM -0800, Shawn O. Pearce wrote:
> 
> > On Tue, Nov 27, 2012 at 4:26 PM, Felipe Contreras 
> > <felipe.contreras@gmail.com> wrote:
> > > On Wed, Nov 28, 2012 at 1:12 AM, Eric S. Raymond 
> <esr@thyrsus.com> wrote:
> > >> Shawn Pearce <spearce@spearce.org>:
> > >>> Well... if we added a fractional seconds to a commit, older 
> > >>> versions of Git will scream loudly and refuse to work 
> with the new 
> > >>> commit. That would create a fork of Git.
> > >>
> > >> So much for that idea, I guess.
> > >>
> > >> Unless..I don't know how git's database representations 
> work.  Are 
> > >> they version-stamped in any way?  If so, some slightly painful 
> > >> hackery would get around that problem.
> > >
> > > % git cat-file -p HEAD
> > >
> > > You'll see exactly how git stores commits. Changing anything in 
> > > there must be done carefully.
> > 
> > Apparently there is no room to change in these fields 
> without breaking 
> > compatibility with all current versions of Git. So its not 
> just done 
> > carefully... its deciding to make Git 2.0 that is not 
> compatible with 
> > any Git 1.x release.
> 
> There is room for new headers, and older versions of git will 
> ignore them. You could add a new "committer-timestamp" field 
> that elaborates on the timestamp included on the committer 
> line. Newer versions of git would respect it, and older 
> versions would fall back to using the committer timestamp.
Suggestion add a ms offset field. Ex:

jpyeron@black /projects/git/git $ git cat-file -p HEAD tree 1e24acfbfcc05aa57e8cb2cfe3ffe01cb100961d parent e98fa647aa5673cc95b6e9be1fdc13c0afa2cb37 author Junio C Hamano <gitster@pobox.com> 1350495361 -0700 committer Junio C Hamano <gitster@pobox.com> 1350495402 -0700 mstimestamps author 0 committer 1234

Git 1.7.12.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
> 
> But I really wonder if anybody actually cares about adding 
> sub-second timestamp support, or if it is merely "because SVN has it".

Not because subversion has it but because date != git(precisedate) and some automation using git in a larger enterprise workflow may assume that date 1354065991.1234 going in should be the same when queried.

-Jason
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-                                                               -
- Jason Pyeron                      PD Inc. http://www.pdinc.us -
- Principal Consultant              10 West 24th Street #100    -
- +1 (443) 269-1555 x333            Baltimore, Maryland 21218   -
-                                                               -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This message is copyright PD Inc, subject to license 20080407P00.
Previous: Jeff KingNext: Felipe Contreras
Message 11 of 41 in “Millisecond precision in timestamps?”
  1. Eric S. RaymondNov 27, 2012
  2. Shawn PearceNov 27, 2012
  3. Junio C HamanoNov 27, 2012
  4. Eric S. RaymondNov 27, 2012
  5. Shawn PearceNov 27, 2012
  6. Eric S. RaymondNov 28, 2012
  7. David LangNov 28, 2012
  8. Felipe ContrerasNov 28, 2012
  9. Shawn PearceNov 28, 2012
  10. Jeff KingNov 28, 2012
  11. Jason PyeronNov 28, 2012
  12. Felipe ContrerasNov 28, 2012
  13. Eric S. RaymondNov 28, 2012
  14. Jeff KingNov 28, 2012
  15. Felipe ContrerasNov 28, 2012
  16. Eric S. RaymondNov 28, 2012
  17. Jeff KingNov 28, 2012
  18. Eric S. RaymondNov 28, 2012
  19. Junio C HamanoNov 28, 2012
  20. Eric S. RaymondNov 28, 2012
  21. David AguilarNov 28, 2012
  22. Andreas EricssonNov 28, 2012
  23. Robin RosenbergDec 5, 2012
  24. James CloosDec 10, 2012
  25. Thomas BergNov 28, 2012
  26. Felipe ContrerasNov 28, 2012
  27. Thomas BergNov 28, 2012
  28. Junio C HamanoNov 28, 2012
  29. Andreas EricssonNov 28, 2012
  30. Phil HordNov 29, 2012
  31. Jeff KingNov 29, 2012
  32. Eric S. RaymondNov 28, 2012
  33. Felipe ContrerasNov 28, 2012
  34. Junio C HamanoNov 28, 2012
  35. Pyeron, Jason J CTR (US)Nov 27, 2012
  36. Eric S. RaymondNov 29, 2012
  37. Junio C HamanoNov 29, 2012
  38. Felipe ContrerasNov 29, 2012
  39. Eric S. RaymondNov 29, 2012
  40. Junio C HamanoNov 29, 2012
  41. Eric S. RaymondNov 29, 2012

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.