[openib-general] Initial Plan for userspace git trees

Sasha Khapyorsky sashak at voltaire.com
Sun Nov 26 10:36:31 PST 2006


On 16:44 Sun 26 Nov     , Michael S. Tsirkin wrote:
> > Quoting r. Sasha Khapyorsky <sashak at voltaire.com>:
> > Subject: Re: Initial Plan for userspace git trees
> > 
> > On 16:47 Tue 21 Nov     , Hal Rosenstock wrote:
> > > I'm forwarding this email on behalf of Sasha. For some reason, he is
> > > having trouble posting to openib-general. He tried posting this
> > > yesterday and again today but to no avail.
> > > 
> > > As an update on this, the svn repository on the new OFA server was
> > > sync'd last night so the userspace git trees are being updated from
> > > this.
> > 
> > All userspace git trees were updated again today from synced SVN
> > repository. Also I added new aliases to apache configuration, and now
> > GITWEB on the new server can be accessed as:
> > 
> >   http://staging.openfabrics.org/git
> > 
> > , or
> > 
> >   http://staging.openfabrics.org/gitweb
> 
> OK, I cloned perftest.git, imgen.git and mstflint.git, and everything seems to
> be well for now.  I'll be checking this more in the coming days but so far all
> the history seems to have been preserved properly.
> 
> I still need to prune away irrelevant branches,
> but for now you can already access the trees at
> 
> git://staging.openfabrics.org/~mst/perftest.git
> git://staging.openfabrics.org/~mst/mstflint.git
> git://staging.openfabrics.org/~mst/imgen.git

Great. Only one comment:

Probably it is better to prune irrelevant branches and tags before
publishing. The reason is that if somebody cloned "dirty" tree and after
this do git-pull against "clean" tree he will get errors like:

  error: no such remote ref refs/heads/backport
  error: no such remote ref refs/heads/backport-to-2.6.11
  error: no such remote ref refs/heads/backport-to-2.6.9
  ....

This is because .git/remotes/origin file was generated by git-clone and
has list of all original heads as it was in the "dirty" tree.

This is simple to fix by tree re-cloning or .git/remotes/origin file
editing, but it cannot be done in some central way and fails to an each
user which cloned "dirty" tree already.


Branches and tags pruning is trivial procedure: 'git-branch -l' and
'git-tag -l' show all existing branches and tags. 'git-branch -D
<branch-name>' removes branch, 'git-tag -d <tag-name>' removes tag.
After this running 'git-prune' and 'git-repack -a -d' will remove
unreferenced anymore objects and regenerate git pack file.

Other way to publish "clean" tree is to push only relevant references
to the public tree, like:

  git-push ssh://staging.openfabrics.org/~sashak/scm/clean-management.git \
        master 1.1 1.0 openib-1.0-rc5

Sasha




More information about the general mailing list