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

Re: [Xen-devel] [PATCH] raisin: Some git-checkout improvements



On Wed, 22 Apr 2015, George Dunlap wrote:
> On 04/22/2015 03:11 PM, Stefano Stabellini wrote:
> > On Tue, 21 Apr 2015, George Dunlap wrote:
> >> 1. Switch local variables to lower-case and declare them local.
> > 
> > This is good.
> > 
> > 
> >> 2. Cloning git trees from remote repos is often a very long operation.
> >> Allow the user to specify a faster git cache as a prefix.
> >>
> >> 3. At the moment you can either check out a specific changeset or
> >> "master", but you can't check out a different branch, because git
> >> doesn't always look in origin/ for the branch.  If the initial git
> >> checkout $tag fails, try checking out origin/$tag before giving up.
> > 
> > I am in two minds about this, because it is still possible for the user
> > to simply:
> > 
> > LIBVIRT_REVISION="origin/blah"
> 
> Then we should have all the revisions point to "origin/master" for
> consistency.

That is true. I think it is probably simpler that way.


> In any case, it requires the user to know the default remote repository
> name.

Right, but that is always origin, isn't it? In fact you would hardcode
it in the script with your change below:

+           $GIT checkout -b dummy $tag \
+               || $GIT checkout -b dummy origin/$tag


> >> Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
> >> ---
> >> CC: Stefano Stabellini <stefano.stabellini@xxxxxxxxxx>
> >> ---
> >>  defconfig           |  3 +++
> >>  lib/git-checkout.sh | 33 ++++++++++++++++++++-------------
> >>  2 files changed, 23 insertions(+), 13 deletions(-)
> >>
> >> diff --git a/defconfig b/defconfig
> >> index d3ef283..38c7455 100644
> >> --- a/defconfig
> >> +++ b/defconfig
> >> @@ -35,3 +35,6 @@ QEMU_TRADITIONAL_REVISION="master"
> >>  SEABIOS_REVISION="master"
> >>  GRUB_REVISION="master"
> >>  LIBVIRT_REVISION="master"
> >> +
> >> +# Git prefix.  Use this if you have a git caching proxy.
> >> +#GIT_PREFIX=""
> > 
> > Are you aware that you can simply specify a directory in the URL
> > variable?
> 
> I wasn't thinking of a local directory; I was thinking of the git proxy
> running locally on drall; e.g.:
> 
> git://drall.uk.xensource.com:9419/git://xenbits.xen.org/xen.git
> 
> contacts a git proxy server running on drall, port 9419. If the proxy
> server doesn't already have that repo, it will clone it; otherwise it
> will just do a fetch.  Then it feeds you the info locally, which for a
> clone is typically a *lot* faster than cloning remotely.  I think
> Anthony has a git proxy running on his workstation too.
> 
> I was thinking of suggesting the name of a local caching proxy people
> might wish to set up here; but ATM I'm just using the one that someone
> else has already set up; I don't even know the name of either of the
> ones I mentioned above. :-)

OK then


> > Also wouldn't it be possible to achieve the same goal with the GIT
> > environmental variable?
> 
> A brief scan of the git man page, combined with a brief survey of
> Google, didn't turn up anything...

All right. You might just want to add few more words in the comment on
defconfig, or maybe a pointer to an url that explains what a git proxy
is.


> >> -      cd $DIR-remote.tmp
> >> +      cd $dir-remote.tmp
> >>        $GIT branch -D dummy >/dev/null 2>&1 ||:
> >> -      $GIT checkout -b dummy $TAG
> >> +      $GIT checkout -b dummy $tag \
> >> +          || $GIT checkout -b dummy origin/$tag
> > 
> > XXX
> 
> Is this actually a comment, or just a placeholder of some sort? :-)

It was a placeholder but I commented above instead :-)

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.