Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #4690

Re: git-describe

From Tom Anderson <twic@urchin.earth.li>
Newsgroups comp.lang.java.programmer
Subject Re: git-describe
Date 2011-05-29 00:33 +0100
Organization Stack Usenet News Service
Message-ID <alpine.DEB.2.00.1105290025460.28130@urchin.earth.li> (permalink)
References (2 earlier) <irmm2m$5a3$1@lust.ihug.co.nz> <alpine.DEB.2.00.1105272251580.1610@urchin.earth.li> <irpmuv$si5$1@lust.ihug.co.nz> <irppn6$js9$1@dont-email.me> <irptnt$rs$1@lust.ihug.co.nz>

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Sat, 28 May 2011, Lawrence D'Oliveiro wrote:

> In message <irppn6$js9$1@dont-email.me>, Joshua Cranmer wrote:
>
>> On 05/27/2011 10:34 PM, Lawrence D'Oliveiro wrote:
>>>
>>> In message<alpine.DEB.2.00.1105272251580.1610@urchin.earth.li>, Tom
>>> Anderson wrote:
>>>
>>>> $ hg update 0
>>>
>>> So this command has started a new branch?
>>
>> No, hg update goes to that revision. I think the git equivalent is git 
>> checkout (bizarrely named, if you ask me).
>
> Why? It gets a snapshot out of the tree. What else would a “checkout” 
> do?

Go 'beep' when you wave a packet of cornflakes at it.

'Checkout' and 'checkin' are both poor names, IMO. I appreciate that there 
is historical precedent for their use, and so their meanings are well 
understood, but as metaphors, they aren't very good. Checking out and 
checking in are about controlling exclusive access to something (eg a book 
in a library), which is something that some legacy source control systems 
do, but not something our shiny modern DVCSs do (or even something CVS dd, 
mostly).

>>> In Git, every branch has a name.
>>
>> hg branches have names ...
>
> I didn’t see any in the commit example posted earlier.

Joshua is talking about named branches. This is an anonymous branch. I 
don't know why he's talking about named branches.

>> ... although branch names are a property of the changeset and not the 
>> repository (which makes git hard for me to use, having used hg for 
>> 6-odd years).
>
> I’m not sure how that’s different from Git. In Git, a branch head points 
> to a commit/changeset, and that’s all there is to it.

Mercurial branches don't point to commits - the branch is a property of 
the changeset, it's actually recorded in the changeset's data in the 
repository. You could take a changeset, export it, fax it to someone, and 
when they imported it and looked at it, it would have the branch name on 
it. Some people recoil in horror at this; others love it. It does mean 
that Mercurial named branches are not suited for the same uses as Git 
branches; in Git, you'd use named branches for developing a few features 
locally to send to Linus, but in Mercurial, those would be anonymous 
branches, perhaps identified by bookmarks, or stored in separate 
repositories. Named branches are more for things like trunk/QA/release.

tom

-- 
The ``is'' keyword binds with the same precedence as ``.'', even when
it's not actually there. -- Larry Wall, Apocalypse 2

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

git-describe Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-05-25 22:14 +1200
  Re: git-describe Tom Anderson <twic@urchin.earth.li> - 2011-05-26 17:59 +0100
    Re: git-describe Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-05-27 11:00 +1200
      Re: git-describe Tom Anderson <twic@urchin.earth.li> - 2011-05-27 23:51 +0100
        Re: git-describe Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-05-28 14:34 +1200
          Re: git-describe Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-05-27 23:21 -0400
            Re: git-describe Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-05-28 16:29 +1200
              Re: git-describe Tom Anderson <twic@urchin.earth.li> - 2011-05-29 00:33 +0100
          Re: git-describe Tom Anderson <twic@urchin.earth.li> - 2011-05-29 00:25 +0100

csiph-web