git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: marceloribeiro <marcelo@sonnay.com>
Cc: git@vger.kernel.org
Subject: Re: Numeric Revision Names?
Date: Fri, 03 Oct 2008 09:07:49 -0700 (PDT)	[thread overview]
Message-ID: <m3d4ihr7as.fsf@localhost.localdomain> (raw)
In-Reply-To: <19796862.post@talk.nabble.com>

marceloribeiro <marcelo@sonnay.com> writes:

> I am new to git, and my question may be stupid, but anyway...
> I am used to the numeric revision names on svn, and on Git
> all I get are hexadecimal names.
> 
> Is there any way to configure it to start a projects revisions on
> lets say, revision 0, and keep incrementing it after each commit?
> 
> I tried finding it on git doc but wasnt able to. Maybe I am missing
> something....

First, it is simply not possible to have incremental revision numbers
in distributed version control system like Git, at least not without
some central authority (assigning revision numbers). Other distributed
SCM use simple revision numbers, but either they are local to branch
and local to repository (not shared) as in case of Mercurial, or
require centralized workflow where one uses different merge than in
leaf repositories, as from what I understand is the case with dotted
revision numbers in Bazaar-NG.

Second, in my opinion revision numbers are not that useful for
projects with large number of commits (where revision number might be
something like r4321), and nonlinear history (you don't know how r4555
relates to r4556: they might be on different branches).  Also you
don't have to use full revision numbers: you can use shortened
revision numbers (usually 6-8 characters is enough, e.g. 5f2d4160);
if you use tags to mark released versions you can use git-describe
output to count revisions from given tag (output contains sha-1
because history migh branch after tag, and number of commits since tag
is not enough to determine commit/revision; e.g. v1.6.0-rc3-17-gc14c8ce
which means 17 commits after tag v1.6.0-rc3).

Additionally when using git you usually use transient revision
numbers, counting commits from tip of branch, for example master~5
means 5 commits in first-parent line from what branch 'master' points
to now.

-- 
Jakub Narebski
Poland
ShadeHawk on #git

  parent reply	other threads:[~2008-10-03 16:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-03 12:37 Numeric Revision Names? marceloribeiro
2008-10-03 12:41 ` Robin Burchell
2008-10-03 12:44 ` Bruce Stephens
2008-10-03 16:07 ` Jakub Narebski [this message]
2008-10-03 16:55   ` Stephen Haberman
2008-10-03 17:13     ` Thomas Rast
2008-10-03 17:42       ` Stephen Haberman
2008-10-05  3:13         ` André Goddard Rosa
2008-10-05  9:19           ` Alex Riesen
2008-10-03 17:14     ` Jeff King
2008-10-03 17:37       ` Jeff King

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=m3d4ihr7as.fsf@localhost.localdomain \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=marcelo@sonnay.com \
    /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).