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

Re: On git 1.6 (novice's opinion)

From
Matthieu Moy <matthieu.moy@imag.fr>
Date
Apr 1, 2009, 07:54 UTC
Message-ID
<vpq63horepl.fsf@bauges.imag.fr>
In-Reply-To
<49D32CE5.21780.391D18@Ulrich.Windl.rkdvmks1.ngate.uni-regensburg.de>
"Ulrich Windl" <ulrich.windl@rz.uni-regensburg.de> writes:
Show 11 quoted lines
>> Not to mention that you can have multiple roots (multiple commits with
>> no parent) in git repository; besides independent branches (like
>> 'man', 'html' or 'todo') it is usually result of absorbing or
>> subtree-merging other projects.  In 'master' branch there are 5 roots
>> or more: joined 'git-tools' (mailinfo / mailsplit), absorbed gitweb,
>> and subtree-merged gitk and git-gui.  And here you would again have
>> multiple commits with the same number...
>
> Which would not harm, because it would be version N from committer X. Any if 
> committer X merges from anything else, the next number would be > N. I did not 
> claim that my method makes a total ordering of commits and merges possible.
Neither does it make the numbers unique for committer X.

If commiter X commits a successor to commit N, it's labeled N+1. If later, he creates another branch from commit N, and commit, the new, other commit will be labeled N+1.

This means even within a repository, you cannot say things like "commit number N", so, OK, you have numerical IDs, but you can't use them.

What can be interesting is that a commit takes max{all commits in repository}+1, not just max{parents} + 1. Then, you have local revision numbers, but they're not stable. Indeed, that's precisely what Mercurial does.

But I'm not sure how much simplicity it adds compared to the confusion it adds. Newbies will see Mercurial identifiers as

changeset: 2:699b81a5851b changeset: 1:fd4b6597548f changeset: 0:58cff172192e

And think "OK, the revision numbers are 0, 1, 2, and the hexadecimal stuff beside is useless". And one day, he'll send a mail, post a bugreport, or whatever, saying "I have a problem with revision number 42", and no one else but him will know which revision is called "42".

> I truly believe in unique IDs, but they are just not handy in every situation.

Usually, people find Git IDs to be non-handy until the find out they can cut-and-paste only the first few digits in most cases, like 442dd42 instead of 442dd42d6d4903640b0dc5561481a77c88dcea90 ;-).

-- 
Matthieu
Previous: Andreas EricssonNext: Ulrich Windl
Message 31 of 49 in “On git 1.6 (novice's opinion)”
  1. Ulrich WindlMar 27, 2009
  2. H.Merijn BrandMar 27, 2009
  3. Ulrich WindlMar 27, 2009
  4. Etienne Vallette d'OsiaMar 27, 2009
  5. Etienne Vallette d'OsiaMar 27, 2009
  6. Dmitry PotapovMar 27, 2009
  7. Ulrich WindlMar 27, 2009
  8. Matthieu MoyMar 27, 2009
  9. Etienne Vallette d'OsiaMar 27, 2009
  10. Ulrich WindlApr 1, 2009
  11. Matthieu MoyApr 1, 2009
  12. Junio C HamanoMar 28, 2009
  13. Junio C HamanoMar 28, 2009
  14. Dmitry PotapovMar 28, 2009
  15. Russ DillMar 30, 2009
  16. Ulrich WindlApr 1, 2009
  17. Andreas EricssonApr 1, 2009
  18. Ulrich WindlApr 1, 2009
  19. Andreas EricssonApr 1, 2009
  20. Heiko VoigtApr 1, 2009
  21. Dmitry PotapovMar 27, 2009
  22. Ulrich WindlMar 27, 2009
  23. Matthieu MoyMar 27, 2009
  24. Ulrich WindlApr 1, 2009
  25. Matthieu MoyApr 1, 2009
  26. Michael J GruberMar 27, 2009
  27. Ulrich WindlMar 27, 2009
  28. Jakub NarebskiMar 27, 2009
  29. Ulrich WindlApr 1, 2009
  30. Andreas EricssonApr 1, 2009
  31. Matthieu MoyApr 1, 2009
  32. Ulrich WindlApr 1, 2009
  33. Andreas EricssonApr 1, 2009
  34. Jakub NarebskiApr 2, 2009
  35. demerphqMar 28, 2009
  36. Junio C HamanoMar 28, 2009
  37. Ulrich WindlApr 1, 2009
  38. Bryan DonlanMar 29, 2009
  39. Johannes SchindelinMar 29, 2009
  40. Ulrich WindlApr 1, 2009
  41. Ulrich WindlApr 1, 2009
  42. Andreas EricssonMar 30, 2009
  43. Ulrich WindlApr 1, 2009
  44. Andreas EricssonApr 1, 2009
  45. Ulrich WindlApr 1, 2009
  46. Andreas EricssonApr 1, 2009
  47. Ulrich WindlApr 1, 2009
  48. Andreas EricssonApr 1, 2009
  49. Kris ShannonApr 1, 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.