tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Is the CVS repository dead yet?


From: Joshua Phillips
Subject: Re: [Tinycc-devel] Is the CVS repository dead yet?
Date: Sun, 22 Mar 2009 09:11:01 +0000

Well git operates in much the same way as mercurial does, only instead of 
referring to commits ("changesets") directly, you have branches pointing to 
them. This one-many branch-commit relationship is one of the reasons I really 
prefer git over mercurial, because you can use human-readable names to 
manipulate the repository, and then remove/rename/otherwise manipulate those 
names. Compare that to mercurial, where you have to use changeset SHA-1s or 
local changeset numbers, to manipulate the repository. Mercurial has branch 
names, but they're just a property of each changeset, and can't be removed.

In terms of having duplicate commits in one branch, all one needs to do is 
make duplicates of some of the commits (using git-rebase, perhaps) and merge 
the two resulting heads.

Consider the following two commits (there are several others like it):
http://repo.or.cz/w/tinycc.git?a=commit;h=1e776b29d3f46db33325d031570d16970ea72c48
http://repo.or.cz/w/tinycc.git?a=commit;h=d80e5525d4051cb38ec28dacadb5d7cd6581cf0a

The first one there is in both the 'mob' and 'master' branches. Nothing wrong 
with that.

The second one is also in the 'mob' branch, forming another head.

Then someone has merged these two together, in commit 
25833e71692e0df1dea8e43c3f4eb74590a4758b:
http://repo.or.cz/w/tinycc.git?a=commit;h=25833e71692e0df1dea8e43c3f4eb74590a4758b

Meaning the mob branch has two copies of the same commits (more than one 
commit has been duplicated). This is very confusing (and makes the repository 
larger than necessary).

This is because for some reason or another, somebody has used git-rebase 
instead of git-merge (maybe because git-rebase is more CVS-ish) and 
duplicated a load of commits, which were then merged together with a little 
less than optimum care.

Now, thankfully, this is the 'mob' branch, which, by its name and nature, is 
going to get a little messy, so I propose that commits are cherry-picked or 
rebased from the mob branch onto the master branch, keeping the master branch 
nice and clean.

Also be aware that you can delete and modify branches remotely. For example, I 
can delete the mob branch and everything that's in it:

git push ssh://address@hidden/srv/git/tinycc.git :mob

which means the mob branch can be rewritten, and people don't have to make 
commits on top of the disorderly mob branch.

P.S. if I ever said there were duplicated commits in the master branch, I was 
mistaken.

> > > Certainly there aren't (and can't be) duplicate commits on the
> > > master branch itself.
> >
> > It's perfectly possible - and it is so in the mob branch. So, yes, rather
> > a mess.
>
> Could you give me examples?  (URLs to duplicate commits in the web
> repository viewer, perhaps?)

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]