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

Re: [doc] User Manual Suggestion

From
Björn Steinbrink <b.steinbrink@gmx.de>
Date
Apr 26, 2009, 18:12 UTC
Message-ID
<20090426181244.GB4942@atjola.homenet>
In-Reply-To
<b4087cc50904260936t4aa05c92ldab3b8ce8c9bd33a@mail.gmail.com>
On 2009.04.26 11:36:04 -0500, Michael Witten wrote:
Show 17 quoted lines
> 2009/4/26 Björn Steinbrink <B.Steinbrink@gmx.de>:
> > On 2009.04.25 15:36:24 -0400, David Abrahams wrote:
> >> Where it's relevant when the user notices that two distinct files have
> >> the same id (because they happen to have the same contents) and wonders
> >> what's up.
> >...
> > And why would your implementation save the same object twice, in two
> > distinct files?
> 
> This question makes me think that you don't understand the parent's
> point. He's not talking about implementation details; in fact, there's
> no reason to mix the git world and the file system world at all in
> this discussion.
> 
> David is pointing out that a user might notice that two different
> trees list the same blob. This can be startling if you have incomplete
> picture about what's going on.

David said that the user encounters two distinct files with the same id. The ids are properties of the objects. So he must have meant object files, or he attributed the id to the wrong thing. I assumed that he didn't mix those things up and really meant the object files, thus my reply.

> >From a practical point of view, you might argue that not too many
> people are looking at trees and blobs;

Heh, I'd rather argue that too _few_ people have looked at commits and trees at least once, whether it's an actual object or a graph like in git for computer scientists.

Show 8 quoted lines
> however, it seems to me that most people are afraid to use any of
> git's most useful features precisely because they don't understand the
> git model and they don't understand that nothing is ever lost unless
> you explicitly clean up unreferenced objects---they don't see how easy
> it is manipulate their repos. I argue that if they are given the full
> knowledge of git's concepts, then they will be able to reason about
> their repo actions with confidence, even if they only work with
> commits.
Agreed.
Show 6 quoted lines
> I think the key is to stress in the documentation the idea that there
> are 2 separate worlds (the git object world and the working
> directory's file system world) and that the git tools provide an
> interface between them; this seems like a small and unnecessarily
> academic point, but I believe that it's important to working with
> confidence.

Agreed. That's also why I asked David why the user would look at the object files in the repo (the .git dir). To some degree those are also an implementation detail. The user works with the working tree and uses the git tools to modify the repo.

Show 6 quoted lines
> > It's an identity relation: same name/id => same object. Unlike e.g. a
> > hash-table where you are expected to deal with collisions, and having
> > the same hash doesn't mean that you have identical data.
> 
> However, having the same *cryptographic* hash does mean that you have
> identical data.

That's the _assumption_ that git makes. Hash collisions are always possible, just hard to create intentionally when the hash function has not yet been broken.

Björn
Previous: Michael WittenNext: David Abrahams
Message 57 of 90 in “[doc] User Manual Suggestion”
  1. David AbrahamsApr 22, 2009
  2. J. Bruce FieldsApr 23, 2009
  3. Michael WittenApr 23, 2009
  4. Jeff KingApr 23, 2009
  5. Michael WittenApr 23, 2009
  6. David AbrahamsApr 23, 2009
  7. Michael WittenApr 24, 2009
  8. Jeff KingApr 24, 2009
  9. J. Bruce FieldsApr 24, 2009
  10. David AbrahamsApr 24, 2009
  11. Jeff KingApr 24, 2009
  12. David AbrahamsApr 24, 2009
  13. Jeff KingApr 24, 2009
  14. David AbrahamsApr 24, 2009
  15. Björn SteinbrinkApr 24, 2009
  16. David AbrahamsApr 25, 2009
  17. Björn SteinbrinkApr 26, 2009
  18. Jeff KingApr 24, 2009
  19. Michael WittenApr 24, 2009
  20. Michael WittenApr 24, 2009
  21. Jeff KingApr 24, 2009
  22. Michael WittenApr 24, 2009
  23. J. Bruce FieldsApr 24, 2009
  24. Jeff KingApr 24, 2009
  25. J. Bruce FieldsApr 24, 2009
  26. Michael WittenApr 24, 2009
  27. David AbrahamsApr 23, 2009
  28. Johan HerlandApr 23, 2009
  29. Michael WittenApr 24, 2009
  30. Johan HerlandApr 24, 2009
  31. Daniel BarkalowApr 24, 2009
  32. Jeff KingApr 24, 2009
  33. Michael WittenApr 24, 2009
  34. Michael WittenApr 24, 2009
  35. Daniel BarkalowApr 24, 2009
  36. Jeff KingApr 24, 2009
  37. Michael WittenApr 24, 2009
  38. Michael WittenApr 24, 2009
  39. Jeff KingApr 24, 2009
  40. Michael WittenApr 25, 2009
  41. Felipe ContrerasApr 25, 2009
  42. Michael WittenApr 24, 2009
  43. Daniel BarkalowApr 25, 2009
  44. Michael WittenApr 25, 2009
  45. Felipe ContrerasApr 25, 2009
  46. David AbrahamsApr 25, 2009
  47. Felipe ContrerasApr 25, 2009
  48. Björn SteinbrinkApr 26, 2009
  49. David AbrahamsApr 26, 2009
  50. Björn SteinbrinkApr 26, 2009
  51. David AbrahamsApr 26, 2009
  52. Björn SteinbrinkApr 26, 2009
  53. David AbrahamsApr 27, 2009
  54. David AbrahamsApr 27, 2009
  55. Michael WittenApr 27, 2009
  56. Michael WittenApr 26, 2009
  57. Björn SteinbrinkApr 26, 2009
  58. David AbrahamsApr 26, 2009
  59. David AbrahamsApr 25, 2009
  60. Björn SteinbrinkApr 24, 2009
  61. Michael WittenApr 25, 2009
  62. David AbrahamsApr 25, 2009
  63. Björn SteinbrinkApr 26, 2009
  64. Björn SteinbrinkMay 2, 2009
  65. Michael WittenMay 2, 2009
  66. Björn SteinbrinkMay 2, 2009
  67. Michael WittenMay 2, 2009
  68. Björn SteinbrinkMay 2, 2009
  69. Michael WittenMay 3, 2009
  70. Björn SteinbrinkMay 3, 2009
  71. Mark LodatoMay 3, 2009
  72. Michael WittenMay 3, 2009
  73. Daniel BarkalowApr 24, 2009
  74. Jeff KingApr 24, 2009
  75. Björn SteinbrinkApr 26, 2009
  76. Michael WittenApr 24, 2009
  77. Björn SteinbrinkApr 27, 2009
  78. David AbrahamsApr 25, 2009
  79. Michael WittenApr 25, 2009
  80. Jeff KingApr 25, 2009
  81. David AbrahamsApr 25, 2009
  82. Jeff KingApr 29, 2009
  83. David AbrahamsApr 29, 2009
  84. Jeff KingApr 29, 2009
  85. J. Bruce FieldsApr 24, 2009
  86. Michael WittenApr 24, 2009
  87. David AbrahamsApr 24, 2009
  88. J. Bruce FieldsApr 24, 2009
  89. J. Bruce FieldsApr 24, 2009
  90. Felipe ContrerasApr 25, 2009

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.