[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] Is the CVS repository dead yet?
From: |
grischka |
Subject: |
Re: [Tinycc-devel] Is the CVS repository dead yet? |
Date: |
Sun, 22 Mar 2009 19:45:13 +0100 |
----- Original Message -----
From: "Joshua Phillips" <address@hidden>
To: <address@hidden>
Sent: Sunday, March 22, 2009 10:11 AM
Subject: Re: [Tinycc-devel] Is the CVS repository dead yet?
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.
Well, I'd maybe not call that duplicate because each commit appears on each
branch only once. True is that from the merge point up both commits are part
of the history.
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.
Yes.
The second one is also in the 'mob' branch, forming another head.
No, where? I don't see that.
Looking at http://repo.or.cz/w/tinycc.git?a=shortlog;h=refs/heads/mob
there is no d80e5525d4051cb38ec28dacadb5d7cd6581cf0a anywhere.
And generally the same patch cannot be applied twice. It does not make sense.
Then someone has merged these two together, in commit
25833e71692e0df1dea8e43c3f4eb74590a4758b:
http://repo.or.cz/w/tinycc.git?a=commit;h=25833e71692e0df1dea8e43c3f4eb74590a4758b
That "someone" was me. Yeah, I could just have reset "mob" to "master", which
is
what I'll do next time.
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).
The mob branch by itself does not have two copies of the same commits.
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.
Well, if I'd merge "mob" into master, then "mob" would become permanent
part of the "master-history". As "mob" is more or less a "patch stack", this
is maybe not what we want.
"Merge" as I see it is more true with history, but could get us a lot of branches over
time, which looks messy in e.g. "gitk" too. So I choose to use "cherry-pick" or
"rebase".
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.
Yes, exactly.
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.
Yes, I know ;)
P.S. if I ever said there were duplicated commits in the master branch, I was
mistaken.
Well, you wrote on the public list that our GIT repo is an "utter mess" and so
on.
Since this is what we are going to use in future I felt like having to check
the facts ;)
Of course there are more than a few ways to do the git, but I think the repo is
still quite okay.
Agree? Disagree? Want to help managing the repo? If yes, get yourself an
username and tell me.
> > 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?)
_______________________________________________
Tinycc-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/tinycc-devel
- Re: [Tinycc-devel] Is the CVS repository dead yet?, (continued)
- Re: [Tinycc-devel] Is the CVS repository dead yet?, grischka, 2009/03/21
- Re: [Tinycc-devel] Is the CVS repository dead yet?, shinichiro . h, 2009/03/21
- Re: [Tinycc-devel] Is the CVS repository dead yet?, Ivo, 2009/03/21
- Re: [Tinycc-devel] Is the CVS repository dead yet?, shinichiro . h, 2009/03/24
- Re: [Tinycc-devel] Is the CVS repository dead yet?, grischka, 2009/03/24
- [Tinycc-devel] Bug, Sandor Zsolt, 2009/03/31
- Re: [Tinycc-devel] Bug, shinichiro . h, 2009/03/31
- Re: [Tinycc-devel] Is the CVS repository dead yet?, Simon 'corecode' Schubert, 2009/03/20
Re: [Tinycc-devel] Is the CVS repository dead yet?, Kirill Smelkov, 2009/03/18
Re: [Tinycc-devel] Is the CVS repository dead yet?, Joshua Phillips, 2009/03/22
- Re: [Tinycc-devel] Is the CVS repository dead yet?,
grischka <=