All of lore.kernel.org
 help / color / mirror / Atom feed
* efficient cloning
@ 2006-03-19 21:16 James Cloos
  2006-03-19 22:31 ` Shawn Pearce
  2006-03-19 23:18 ` Junio C Hamano
  0 siblings, 2 replies; 22+ messages in thread
From: James Cloos @ 2006-03-19 21:16 UTC (permalink / raw)
  To: git

Is there a way to accomplish the effect of this script w/o having to
download any unnecessary objects?

==================================================
#!/bin/bash

lt="/gits/linux-2.6/.git"

if [ $# -ne 2 ]; then
    echo >&2 "Usage: $0 <repo> <target-dir>"
    exit 1
fi

git-clone $1 $2
mkdir -p $2/objects/info
{
 test -f "$lt/objects/info/alternates" &&
 cat "$lt/objects/info/alternates";
 echo "$lt/objects"
} >"$2/objects/info/alternates"

cd $2
git-repack -a -d -s
git-prune-packed
==================================================

I tried to modify git-clone to add an alternates file before calling
fetch, but that file just gets deleted.

I presume I need to clone -s -l the local alternate, re-parent it to
the new URL and grab anything missing, but how can I assure that it
results in exactly the same repo as this script?

I'm often behind tiny straws, so efficiency is important.

-JimC
-- 
James H. Cloos, Jr. <cloos@jhcloos.com>

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2006-03-21 11:29 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-19 21:16 efficient cloning James Cloos
2006-03-19 22:31 ` Shawn Pearce
2006-03-19 23:18 ` Junio C Hamano
2006-03-20  0:32   ` James Cloos
2006-03-20  1:55     ` Junio C Hamano
2006-03-20  8:54       ` Junio C Hamano
2006-03-20 15:18         ` Petr Baudis
2006-03-20 21:39           ` Junio C Hamano
2006-03-20 22:41             ` Petr Baudis
2006-03-20 23:07               ` Junio C Hamano
2006-03-20 16:30         ` Josef Weidendorfer
2006-03-20 23:04           ` Junio C Hamano
2006-03-20 23:21             ` Petr Baudis
2006-03-20 23:49               ` Junio C Hamano
2006-03-21  8:19                 ` Andreas Ericsson
2006-03-21  8:42                   ` Junio C Hamano
2006-03-21  9:19                     ` Jeff King
2006-03-21  9:45                       ` Junio C Hamano
2006-03-21 11:29                         ` Petr Baudis
2006-03-21  0:26             ` Josef Weidendorfer
2006-03-21  0:57               ` Junio C Hamano
2006-03-21  8:28           ` Junio C Hamano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.