emacs-devel
[Top][All Lists]
Advanced

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

Re: Locks on the Bzr repository


From: Leo
Subject: Re: Locks on the Bzr repository
Date: Sat, 21 Aug 2010 21:17:01 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (Mac OS X 10.6.4)

On 2010-08-21 20:59 +0100, Eli Zaretskii wrote:
>> Branching in git is as fast as:
>> 
>>   echo 7adb0b64823cbdcfbbcac9a9e32c6b435f57d889 > .git/refs/heads/mybranch
>> 
>> basically writing a 40-char string to a file.
>
> Are all the branches co-located?  If not, how do you cope with the
> bootstrap of a new branch, which takes much longer than writing a
> string to a file?

There's no bootstrap of a new branch. Branch is a 'symbolic-link' and it
is updated to always point to the most recent commit. You check out a
branch by setting HEAD to that commit contained in
.git/refs/heads/mybranch and if it is a working (non-bare) directory the
contents are updated to the tree object contained in the commit.

1. get the commit id
/Users/Shared/sources/emacs23.2 $ git rev-parse Ferrari
ddb950a3e08e3501c223bea9c1086abce4e13cbb

which is the same as

/Users/Shared/sources/emacs23.2 $ git rev-parse HEAD
ddb950a3e08e3501c223bea9c1086abce4e13cbb

2. show the contents of a commit
/Users/Shared/sources/emacs23.2 $ git cat-file -p ddb950a 
tree d1395168668604b1cb603e32c1d999043add1ece
parent ef9134cc92f8ebb266c750629fac7360ba5b75d2
parent 59549342ff44c4d431f52a3baf5e6a7ae0a88759
parent 7f3be0b47a1fa5cc73d45c3d9ed30107749b80f0
author Leo <address@hidden> 1282321429 +0100
committer Leo <address@hidden> 1282321429 +0100

Merge branches 'git-send-email', 'emacs-server' and 'ido' into Ferrari

3. show the tree object in the commit.
/Users/Shared/sources/emacs23.2 $ git cat-file -p d13951
100644 blob a53a5ca2fa970cff2342b8d33da8f22647297da0    .dir-locals.el
100644 blob 32b44ceb0a3628af22d790e5d3442addbec85e2f    BUGS
100644 blob 94a9ed024d3859793618152ea559a168bbcbb5e2    COPYING
100644 blob c51dced40ef1f656df1228e4905a947730469d7d    ChangeLog
100644 blob 005aac08d87f82248da9ac00091d15bed83eb7cc    INSTALL
100644 blob 8f8367518de9ac12d99c242582455e02093a9801    Makefile.in
100644 blob d41304b2f2c62462e8e41926bf50425340e553cb    README
100644 blob f2eb0262e6029a824a20eeb76791a2d4e6e5a0ef    config.bat
100755 blob e792aac60807bae3d8ef9f48c2a66e56fa4a4477    config.guess
100755 blob 5ecc18b6ada024c4aef5941a5667a3855849e057    config.sub
100755 blob 12b34f54a0049750bb92436ab410b4de6256d11a    configure
100644 blob 156ec2773a322be8bab14b2520a35437c277f5c5    configure.in
040000 tree 5c479520810300c1ab592d1faf953e27eeab32f1    doc
040000 tree de14492ef9724818b455cc93e2a4b065e5332d7c    etc
040000 tree 4a8f090a5d9fb6408e3bffb84ac380e6db8bccd2    info
100755 blob 058b26c82d24335834ad0472109d0cbc1c829084    install-sh
040000 tree 4398aef6800173aa3e602149219e60af1a13e96e    leim
040000 tree 012e4b3be3dc8d63632a6555a93917f113eb2dee    lib-src
040000 tree c56fd64ede1aafd8e0342ff992deee52623a45bc    lisp
040000 tree b318762d0a2386129fb9f8d4fab53513bc2daf9c    lwlib
040000 tree 043be1085f76b65bb7917e59f67e540f27e3d405    m4
040000 tree 65ff8af4fbf924bc4bb8b0074a4fe61cc97fd392    mac
100755 blob a5c600ab37e2bf22b8e0d19df38056ccb66ea9ed    make-dist
100755 blob be98de6be01a1ec467902370b497291cb5d89596    mkinstalldirs
100755 blob ee9e355e3e61d569f9102f4387b108c3cf6dfa04    move-if-change
040000 tree b6b6e11664b383023fea78e202f66da3e57567c3    msdos
040000 tree 66ac1c24a91c5992a967721bec7d967045f03bb9    nextstep
040000 tree 0b835e8cd2c8612be7ba09237d5d1829d5dbf26e    nt
040000 tree 2c6e1bbc971437f32599eff8e301d619ac02fa8e    oldXMenu
040000 tree a57e3c9600ef9fd302d20605a776d63a22089e88    src
100755 blob 26853455e2e0ebd3b5bb3c664a0bd7ad564c6599    update-subdirs
100644 blob 0eb98cc82980c42bb6940d2ab5eab95ac9b5907f    vpath.sed

Leo



reply via email to

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