how to reduce time of git pulling each time when you do a make world on Xen source

I am compiling xen from source and each time I do a make world
it basically gives some or the other error
my problem are not those errors ( I am trying to debug them)
but the problem is each time when I do a make world

Xen basically pulls things from git repository

+ rm -rf linux-2.6-pvops.git linux-2.6-pvops.git.tmp
+ mkdir linux-2.6-pvops.git.tmp
+ rmdir linux-2.6-pvops.git.tmp
+ git clone -o xen -n git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git linux-2.6-pvops.git.tmp
Initialized empty Git repository in /usr/src/xen-4.0.1/linux-2.6-pvops.git.tmp/.git/
remote: Counting objects: 1941611, done.
remote: Compressing objects: 100% (319127/319127), done.

remote: Total 1941611 (delta 1614302), reused 1930655 (delta 1604595)
**Receiving objects: 20% (1941611/1941611), 98.17 MiB | 87 KiB/s, done.**

and if you notice the last line it is still consuming my bandwidth pulling things from internet.How can I stop this step each time and use existing git repository?

Answer

To elaborate on Tobu’s response (his frustration is clear… this is a really stupid way to do a Makefile); there is a Makefile that has the following in there:

rm -rf linux-2.6-pvops.git linux-2.6-pvops.git.tmp
mkdir linux-2.6-pvops.git.tmp
rmdir linux-2.6-pvops.git.tmp
git clone -o xen -n git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git linux-2.6-pvops.git.tmp

What it should really be doing is something like (in pseudocode):

if git repository exists:
    update using `git pull`
else:
    clone a fresh copy using `git clone`

Basically, its being horribly inefficient by ALWAYS cloning a fresh copy of the entire repository. If you’re not familiar with the process, I’d recommend filing a bug report with details.

Attribution
Source : Link , Question Author : Registered User , Answer Author : Andrew M.

Leave a Comment