possible things for 1.1

Matthieu Moy Matthieu.Moy at imag.fr
Tue Dec 4 09:47:06 GMT 2007


Aaron Bentley <aaron.bentley at utoronto.ca> writes:

> Robert Collins wrote:
>
>> Formats:
>>  - doing a git-like thing with tags might be good, allowing 'switch' to
>> select a tag to switch to. Not because I think this is a great way to
>> work, but some people do value it, and tags are cheaper to enumerate
>> than directories.
>
> The way I was thinking of providing git-like workflow was by sticking
> branches in a new directory, .bzr/branches, and providing a shortcut for
> naming them.  So that e.g. "bzr switch @feature-7" would be equivalent
> to "bzr switch .bzr/branches/feature-7".
>
> In your proposal don't the tags just become a new kind of branch?

If the proposal is to do a git-like workflow, that's not
surprising ;-).

In git, both branches and tags are reference to a revision. The
biggest difference is that if you do

$ git checkout some-branch   # think of it as "bzr switch"
$ git commit

Then, the reference some-branch is "moved", in the sense that it is
now a reference pointing to the new revision I've just created. OTOH,
if I do

$ git checkout some-tag
$ git commit

Then, the tag won't be moved. Indeed, the "checkout some-tag" lead me
to what git calls "detached head" (i.e. we're not on any branch)
(that probably doesn't fit well in the bzr flow).

Other than that, there's no fundamental difference between tag and
branch in git.

(you may or may not like it, I'm not arguing about whether bzr should
adopt that, but it actually makes sense)

-- 
Matthieu



More information about the bazaar mailing list