From: alexandrul <alexandrul.ct@gmail.com>
To: Johan Herland <johan@herland.net>
Cc: Norbert Preining <preining@logic.at>, git@vger.kernel.org
Subject: Re: Creating something like increasing revision numbers
Date: Sun, 18 Oct 2009 21:16:23 +0300 [thread overview]
Message-ID: <4ADB5B77.8040605@gmail.com> (raw)
In-Reply-To: <200910181923.19511.johan@herland.net>
Johan Herland wrote:
> Yes. You can create the 'initial' tag with
>
> git rev-list HEAD | tail -n1 | xargs git tag initial
>
> and from then on
>
> git describe --tags --match initial | cut -d'-' -f2
>
> will give you the increasing "revision" number you're looking for. Just be
> aware that if you have two parallel branches with the same number of
> commits, they will give you the same number. I.e. this only works for a
> single, stable (i.e. no history rewrites), branch of development.
So if you concatenate the branch name with the "revision" number you would have
pretty unique tags repo-wide, if you won't rename your branches.
next prev parent reply other threads:[~2009-10-18 18:16 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-18 14:41 Creating something like increasing revision numbers Norbert Preining
2009-10-18 15:03 ` Johan Herland
2009-10-18 15:20 ` Norbert Preining
2009-10-18 17:23 ` Johan Herland
2009-10-18 18:16 ` alexandrul [this message]
2009-10-19 1:15 ` Nicolas Pitre
2009-10-18 22:47 ` Junio C Hamano
2009-10-19 0:48 ` Norbert Preining
2009-10-18 15:29 ` alexandrul
2009-10-18 15:37 ` demerphq
2009-10-18 15:45 ` Norbert Preining
2009-10-18 16:16 ` demerphq
2009-10-18 16:35 ` alexandrul
2009-10-18 15:37 ` Jon Smirl
2009-10-18 21:43 ` Daniel Barkalow
2009-10-19 0:44 ` Norbert Preining
2009-10-19 1:16 ` Daniel Barkalow
2009-10-19 1:33 ` Norbert Preining
2009-10-19 2:41 ` Daniel Barkalow
2009-10-19 1:34 ` Nicolas Pitre
2009-10-19 1:42 ` Norbert Preining
2009-10-19 6:21 ` Johannes Sixt
2009-10-21 7:47 ` David Aguilar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4ADB5B77.8040605@gmail.com \
--to=alexandrul.ct@gmail.com \
--cc=git@vger.kernel.org \
--cc=johan@herland.net \
--cc=preining@logic.at \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).