Draft git repo posted (HOWTO to follow soon)

Gerald (Jerry) Carter jerry at samba.org
Thu Oct 4 18:35:38 GMT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Derrell Lipman wrote:

> The HOWTO will likely cover all of this, but in case you 
> care about it now...  I found a few discrepancies between
> what your message said should happen and my reality...
> 
> On 10/4/07, Gerald (Jerry) Carter <jerry at samba.org> wrote:
>> Clone the draft repo:
>>
>>   $ git clone git://git.samba.org/jerry/samba-draft.git
>>
>> If you want to view the import history as well:
>>
>>   $ git remote add cvs git://git.samba.org/jerry/samba-cvsimport.git
>>   $ git remote add cvs-samba4 \
>>       git://git.samba.org/jerry/samba4-cvsimport.git
>>   $ git remote add svn git://git.samba.org/jerry/samba-svnimport.git
>>
>>   $ for r in cvs cvs-samba4 svn; do git fetch $r; done
>>
>> View available branches:
> 
> Following the clone (but not doing the cvs stuff), this command:
> 
>>   $ git branch -r
> 
> yields no output.  No remote branches?

Are you sure?  I ran this on the server, but it should be no different
than using a network transport.

  $ git clone /data/git/jerry/samba-draft.git
  Initialized empty Git repository in /home/jerry/samba-draft/.git/
  remote: Generating pack...
  remote: Done counting 398819 objects.
  remote: Deltifying 398819 objects...
  remote:  100% (398819/398819) done
  Indexing 398819 objects...
  remote: Total 398819 (delta 305996), reused 393216 (delta 301025)
   100% (398819/398819) done
  Resolving 305996 deltas...
   100% (305996/305996) done
  jerry at us2:~$ cd samba-draft/
  jerry at us2:~/samba-draft$ git branch -r
    origin/v2-2-stable
    origin/v3-0-stable
    origin/v3-0-test
    origin/v3-0-unstable
    origin/v3-2-stable
    origin/v3-2-test
    origin/v3-2-unstable
    origin/v4-0-stable
    origin/v4-0-test
    origin/v4-0-unstable


>> git-log  will work on local checkouts and remote refs as well.
>> For example,
>>
>>   $ git log svn/SAMBA_3_2
> 
> That command yields:
> 
> fatal: ambiguous argument 'svn/SAMBA_3_2': unknown revision or path
> not in the working tree.
> Use '--' to separate paths from revisions

It's because you didn't run the optional "git-remote" steps.
Generically, I should say that git-log runs on local and remote
branches which means anything from the git-branch, git-branch -r,
or git-tag -l.

> I suspect, however, that this is an issue of me learning how to use
> git.  Things seem to have gotten here, as if I do
> 
>  git checkout -b djl-v3-2-unstable v3-2-unstable
> 
> I (very quickly!) get the tree built (in samba-draft, it seems, not in
> a subdirectory called djl-v3-2-unstable as I would have expected, but
> again, this is probably my lack of familiarity with git.)

That command creates a local branch based on the origin/v3-2-unstable
remote branch and checks out the new branch for you.  Git is different
than svn here.  In svn you are checkout out a branch into a directory.
In git you are creating a view of a branch with its own history.

My advice is to drop the svn trunk/branches/tags layout from your
head and think more in terms of views into the repo history.
You can have a single view (checkout) at a time in a given repo.
if you want multiple concurrent checkouts, you can either clone
your local repo multiple times or your can create a super project
and use git-submodule to have the svn branches/ layout.

> I'm eager to see the HOWTO.  :-)

Working on it.






cheers, jerry
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHBTJ6IR7qMdg1EfYRAjq9AKDvIRPqimHZyxXky5ewl4Cs6ItOugCeOHVJ
WRPXh1Np6PAqewz5VzCZAHA=
=+Y2g
-----END PGP SIGNATURE-----


More information about the samba-technical mailing list