git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Subversion-style incrementing revision numbers
@ 2006-09-19 21:07 Joel Dice
  2006-09-19 21:18 ` Petr Baudis
                   ` (3 more replies)
  0 siblings, 4 replies; 28+ messages in thread
From: Joel Dice @ 2006-09-19 21:07 UTC (permalink / raw)
  To: git

Hello, all.

I'm considering adopting Git for a medium-sized project which is currently 
managed using Subversion.  I've used Git for a few smaller projects 
already, and the thing I've missed most from Subversion is the convenience 
of incrementing revision numbers.  The following is a proposal to add this 
feature to Git.


Rationale:

Incrementing revision numbers (IRNs - an acronym I just made up) are 
useful in that they can be treated as auto-generated tags which are easier 
to remember and communicate than SHA hashes, yet do not require extra 
effort to create like real tags.  Also, they have the advantage of being 
chronologically ordered, so if I assert that a bug was fixed in revision 
42 of a shared repository, everyone may assume that revision 45 has that 
fix as well.

Proposal:

As with Subversion, the IRN state in Git would be specific to a given 
repository and have no significance beyond that repository.  Also like 
Subversion, IRN state would be global across a repository, so that a 
commit to any branch would increment the current IRN value.  Every Git 
command taking a revision parameter would accept an IRN using a syntax 
such as "r$IRN".  Every commit would report the IRN to the user as well as 
the SHA ID.  The IRN feature could be enabled or disabled via a 
configuration option.

Implementation:

A simple, efficient implementation of this feature would be based on a 
single file, $GIT_DIR/history, which would contain a newline-delimited 
list of SHA commit IDs in chronological order, oldest first.  The current 
repository IRN would be calculated as the size of that file divided by the 
SHA+newline length, and the commit ID of any IRN could be determined by 
seeking to the correct offset in that file.  Every commit would cause a 
new line to be appended to the history file with that commit's ID. 
Finally, a history file could be generated for an existing repository by 
serializing the commit history based on chronological order.


I'd be happy to put together a patch that implements this, but first I'd 
like to get some feedback.  If something like this has already been 
proposed, please point me to the discussion.  Thanks.

  - Joel

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2006-09-20 19:07 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-19 21:07 Subversion-style incrementing revision numbers Joel Dice
2006-09-19 21:18 ` Petr Baudis
2006-09-19 21:42   ` Joel Dice
2006-09-19 22:00     ` Petr Baudis
2006-09-19 22:24       ` Joel Dice
2006-09-19 22:33         ` Shawn Pearce
2006-09-19 22:40         ` Johannes Schindelin
2006-09-19 22:39     ` Shawn Pearce
2006-09-19 21:58   ` Jakub Narebski
2006-09-19 21:51 ` Linus Torvalds
2006-09-19 22:06   ` Petr Baudis
2006-09-19 22:20     ` Linus Torvalds
2006-09-19 23:35       ` Joel Dice
2006-09-20  0:15         ` Jakub Narebski
2006-09-20 16:13           ` Joel Dice
2006-09-20  7:46     ` Junio C Hamano
2006-09-20 17:28     ` Robin Rosenberg
2006-09-20 18:22       ` Petr Baudis
2006-09-20 19:07         ` Junio C Hamano
2006-09-19 22:07 ` Jakub Narebski
2006-09-19 22:11   ` Petr Baudis
2006-09-19 22:17   ` Jakub Narebski
2006-09-19 23:07     ` Joel Dice
2006-09-19 22:18   ` Shawn Pearce
2006-09-19 22:23   ` Shawn Pearce
2006-09-19 22:30   ` Joel Dice
2006-09-19 22:09 ` Shawn Pearce
2006-09-19 22:40   ` Joel Dice

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).