[pacman-dev] [PATCH 4/4] makepkg: git: update existing sources in srcdir without removing them first.
SamLT
samuel.lethiec at intelunix.fr
Wed Dec 18 10:05:37 EST 2013
On Wed, Dec 18, 2013 at 01:34:40PM +1000, Allan McRae wrote:
> On 18/12/13 03:34, SamLT wrote:
> >> William Giokas 1007380 at gmail.com
> >> Tue Dec 10 14:56:18 EST 2013
> >>
<...snip...>
> > Uwe Koloska said "local clones are cheap",
> > (https://mailman.archlinux.org/pipermail/aur-general/2013-April/022955.html
> > ) while I agree it's fast it also copies a whole bunch of files which
> > won't be used for the build (namely the .git directory).
> > Although, this does not feel right(to me), I cannot find any tangible
> > reason other that premature EOL of our beloved SSD *sick*.
>
> I think hardlinks are used a lot by git here (provided SRCDEST is on the
> same partition).
>
> > Anyway, why not just doing something like this for step 2:
> > cd $git archive --format=tar --prefix=$pkgname/ . | tar xf - -C $srcdir
> >
> > (or even a shallow clone)
> >
>
> Because we do the branch/tag/commit checkout after we create the $srcdir
> copy.
>
<...snip...>
On Wed, Dec 18, 2013 at 11:04:38AM +0100, Lukas Jirkovsky wrote:
> On Tue, Dec 17, 2013 at 6:34 PM, SamLT <samuel.lethiec at intelunix.fr> wrote:
> > Anyway, why not just doing something like this for step 2:
> > cd $git archive --format=tar --prefix=$pkgname/ . | tar xf - -C $srcdir
> >
> > (or even a shallow clone)
>
> To expand the existing options, there's also
> git clone --shared
> but that is potentially dangerous.
>
> I'm still convinced that cloning the repository is a good thing,
> because it's fast, it uses hard links so it actually doesn't write
> that much and it allows easy updates.
>
I had completely forgotten about git handling nicely local clones! I see
no reason to discuss this anymore!
Thank you both!
sam
> Lukas
>
More information about the pacman-dev
mailing list