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

Re: Millisecond precision in timestamps?

From
TBThomas Berg <merlin66b@gmail.com>
Date
Nov 28, 2012, 09:10 UTC
Message-ID
<CABYiQpnEZECU5Vj5JzMimtw-CAJQz2d=3rii4gM6d37wCnO5AA@mail.gmail.com>
In-Reply-To
<CAMP44s3MPMySnwjWjzo4aRX05u05xratgiyiYJUYPmnV2WK6kQ@mail.gmail.com>

On Wed, Nov 28, 2012 at 9:44 AM, Felipe Contreras <felipe.contreras@gmail.com> wrote:

Show 15 quoted lines
>> If roundtripping to other version control systems is an argument,
>> adding sub-second timestamps could potentially create as many problems
>> as it solves. For example, I've been using the hg-git bridge, and it
>> supports roundtripping between git and mercurial today (for most repos
>> I've tried anyway). I may have missed something, but this could imply
>> that mercurial doesn't care about sub-second timestamps either. If so,
>> and if git suddenly were to record it, it would no longer be as
>> straight forward to represent git history in hg.
>
> I'm not entirely sure. The API seems to return a float for the time,
> but at least as far I can see, it never has any decimals anyway.
>
> But it doesn't really matter, mercurial doesn't have a committer
> information either. This is solved by tools like hg-git by storing the
> information in an 'extra' field, which can store anything.

True. For many commits though, hg-git doesn't need any extra fields, as far as I've seen. A timestamp incompatibility would require extra info on every commit.

> Either way, I don't see the point in changing git's commit format for
> external tools. The git-notes functionality works just fine for that,
> it just needs to be attached in the relevant places, like 'git
> fast-export'.

I agree. Even encoding info in the commit message works fine, and git-svn already does that.

> BTW. Have you checked git's native support for hg?[1]
That's been added after I played with this last, I'll have a look.

Cheers, Thomas

Previous: Felipe ContrerasNext: Junio C Hamano
Message 27 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.