Re: [PATCH] Get commits from remote repositories by HTTP

2005-04-18 Thread tony . luck
> ...and this is precisely why ls-tree actually outputs those "blob" and > "tree" tags. ;-) Doh! Here's a fresh copy with "if [ $tag = tree ]". I just used it to pull from Linus into an "empty" directory (just ran init-db to make the .git .git/objects and .git/objects/xx directories). -Tony #

Re: [PATCH] Get commits from remote repositories by HTTP

2005-04-18 Thread Petr Baudis
Dear diary, on Mon, Apr 18, 2005 at 08:41:42PM CEST, I got a letter where [EMAIL PROTECTED] told me that... > >Not a patch ... it is a whole file. I called it "git-wget", but it might > >also want to be called "git-pulltop". > > It's been pointed out to me that I based this script on a pre-histor

Re: [PATCH] Get commits from remote repositories by HTTP

2005-04-18 Thread tony . luck
>Not a patch ... it is a whole file. I called it "git-wget", but it might >also want to be called "git-pulltop". It's been pointed out to me that I based this script on a pre-historic version of ls-tree from sometime last week. Modern versions print the mode with %06o so there is a leading 0 on

Re: [PATCH] Get commits from remote repositories by HTTP

2005-04-16 Thread tony . luck
>How about building a file list and doing a batch download via 'wget -i >/tmp/foo'? A quick test (on my ancient wget-1.7) indicates that it reuses >connectionss when successive URLs point to the same server. Here's a script that does just that. So there is a burst of individual wget commands to

Re: [PATCH] Get commits from remote repositories by HTTP

2005-04-16 Thread Adam Kropelin
Daniel Barkalow wrote: On Sat, 16 Apr 2005, Adam Kropelin wrote: How about building a file list and doing a batch download via 'wget -i /tmp/foo'? A quick test (on my ancient wget-1.7) indicates that it reuses connectionss when successive URLs point to the same server. You need to look at some of t

Re: [PATCH] Get commits from remote repositories by HTTP

2005-04-16 Thread Daniel Barkalow
On Sat, 16 Apr 2005, Adam Kropelin wrote: > Tony Luck wrote: > > Otherwise this looks really nice. I was going to script something > > similar using "wget" ... but that would have made zillions of seperate > > connections. Not so kind to the server. > > How about building a file list and doing

Re: [PATCH] Get commits from remote repositories by HTTP

2005-04-16 Thread Daniel Barkalow
On Sun, 17 Apr 2005, Martin Mares wrote: > Hello! > > > This adds a program to download a commit, the trees, and the blobs in them > > from a remote repository using HTTP. It skips anything you already have. > > Is it really necessary to write your own HTTP downloader? If so, is it > necessary t

Re: [PATCH] Get commits from remote repositories by HTTP

2005-04-16 Thread Adam Kropelin
Tony Luck wrote: Otherwise this looks really nice. I was going to script something similar using "wget" ... but that would have made zillions of seperate connections. Not so kind to the server. How about building a file list and doing a batch download via 'wget -i /tmp/foo'? A quick test (on my

Re: [PATCH] Get commits from remote repositories by HTTP

2005-04-16 Thread Daniel Barkalow
On Sun, 17 Apr 2005, Jan-Benedict Glaw wrote: > On Sat, 2005-04-16 18:03:51 -0400, Daniel Barkalow <[EMAIL PROTECTED]> > wrote in message <[EMAIL PROTECTED]>: > > --- /dev/null (tree:ed4f6e454b40650b904ab72048b2f93a068dccc3) > > +++ a65375b46154c90e7499b7e76998d430cd9cd29d/http-get.c (mode:10064

Re: [PATCH] Get commits from remote repositories by HTTP

2005-04-16 Thread Daniel Barkalow
On Sat, 16 Apr 2005, Tony Luck wrote: > On 4/16/05, Daniel Barkalow <[EMAIL PROTECTED]> wrote: > > +buffer = read_sha1_file(sha1, type, &size); > > You never free this buffer. Ideally, this should all be rearranged to share the code with read-tree, and it should be fixed in common. > It

Re: [PATCH] Get commits from remote repositories by HTTP

2005-04-16 Thread Jan-Benedict Glaw
On Sat, 2005-04-16 18:03:51 -0400, Daniel Barkalow <[EMAIL PROTECTED]> wrote in message <[EMAIL PROTECTED]>: > --- /dev/null (tree:ed4f6e454b40650b904ab72048b2f93a068dccc3) > +++ a65375b46154c90e7499b7e76998d430cd9cd29d/http-get.c (mode:100644 > sha1:6a36cfa079519a7a3ad5b1618be8711c5127b531) >

Re: [PATCH] Get commits from remote repositories by HTTP

2005-04-16 Thread Tony Luck
On 4/16/05, Daniel Barkalow <[EMAIL PROTECTED]> wrote: > +buffer = read_sha1_file(sha1, type, &size); You never free this buffer. It would also be nice if you saved "tree" objects in some temporary file and did not install them until after you had fetched all the blobs and trees that this

Re: [PATCH] Get commits from remote repositories by HTTP

2005-04-16 Thread Martin Mares
Hello! > This adds a program to download a commit, the trees, and the blobs in them > from a remote repository using HTTP. It skips anything you already have. Is it really necessary to write your own HTTP downloader? If so, is it necessary to forget basic stuff like the "Host:" header? ;-) If yo