Re: Creating something like increasing revision numbers
- From
- demerphq <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/"