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

Re: Creating something like increasing revision numbers

From
Ddemerphq <demerphq@gmail.com>
Date
Oct 18, 2009, 15:37 UTC
Message-ID
<9b18b3110910180837h18e15f74g74626847b6ce4da3@mail.gmail.com>
In-Reply-To
<4ADB3452.6030508@gmail.com>
2009/10/18 alexandrul <alexandrul.ct@gmail.com>:
Show 14 quoted lines
> Norbert Preining wrote:
>> My idea is that git - like subversion - could (if asked to) count each
>> commit (global to the repository, irrelevant of the branch) and give it
>> a version number. Since we all will use a bare repository on a server
>> and pull/push from/to there, I think that something similar could be possible.
>
> I was thinking to set a post-commit hook that reads the current version
> from a file, increment and save it, and also set a tag with that value.
>
> Being a DVCS, this kind of versioning can only be trusted on a single repo,
> but if you set it on the "main" repo, it should work.
>
> The only drawback could be the ever growing number of tags,
> I don't know how it will work with thousands of tags or more.

I think the other drawback is that the number would essentially be meaningless and more or less would just be a substitute sha1.

Consider when a remote adds commits and then merges and pushes. What number should those commits have?

Yves
-- 
perl -Mre=debug -e "/just|another|perl|hacker/"
Previous: alexandrulNext: Norbert Preining
Message 10 of 23 in “Creating something like increasing revision numbers”
  1. Norbert PreiningOct 18, 2009
  2. Johan HerlandOct 18, 2009
  3. Norbert PreiningOct 18, 2009
  4. Johan HerlandOct 18, 2009
  5. alexandrulOct 18, 2009
  6. Nicolas PitreOct 19, 2009
  7. Junio C HamanoOct 18, 2009
  8. Norbert PreiningOct 19, 2009
  9. alexandrulOct 18, 2009
  10. demerphqOct 18, 2009
  11. Norbert PreiningOct 18, 2009
  12. demerphqOct 18, 2009
  13. alexandrulOct 18, 2009
  14. Jon SmirlOct 18, 2009
  15. Daniel BarkalowOct 18, 2009
  16. Norbert PreiningOct 19, 2009
  17. Daniel BarkalowOct 19, 2009
  18. Norbert PreiningOct 19, 2009
  19. Daniel BarkalowOct 19, 2009
  20. Nicolas PitreOct 19, 2009
  21. Norbert PreiningOct 19, 2009
  22. Johannes SixtOct 19, 2009
  23. David AguilarOct 21, 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.