Jump to content

git commit revision numbers


Recommended Posts

I was wondering how the revision number used in mangos commit logs was handled. This is really mangos specific, but mangos is one of the few projects I've seen that do this

Specifically how does src/shared/revision_nr.h get updated when a dev pushes a commit and how does the commit message get the [12345] prefix, is this automated through a hook or do they manually change it each time.

just something I was curious about, since I'm pretty sure git couldn't do that on its own by default

Link to comment
Share on other sites

oh wow thanks, had no idea it was something that massive. I wanted to do something similar for a private git repo I have. I think i can learn a lot from that, don't need a lot of the fancy stuff like the sql parts

was about to ask how it is used and then read

Usage: git_id [OPTION]

Generates a new rev number and updates revision_nr.h and the commit message.

Should be used just before push.

thanks again lynx3d, this can be closed since it answered everything i asked

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use