Subject: Re: HOWTO set up a repository which can be pushed into over HTTP

From: Rutger Nijlunsing <[email-masked]>
Date: Tue, 8 Aug 2006 21:02:20 +0200

On Mon, Aug 07, 2006 at 12:55:43AM -0700, Junio C Hamano wrote:
> Johannes Schindelin <[email-masked]> writes:
> 
> > Do people find it useful? Or would you like to wait until I implement an 
> > option in git-http-push to actually init an HTTP repo remotely?
> 
> I do not have need for push over http-dav at the moment myself,
> but I would imagine I would certainly look for it when I would
> need to later.
> 
> Do people find it useful?  More importantly, has somebody else
> independently tried to follow the documentation and found the
> description accurate and helpful?

Today I did try to follow it, and it made an otherwise impossible job
for me doable, although still taking too much hours and a patch. The
'impossible job' for me had to do with my zero-apache experience and
(probably) a bug in WebDAV.

Find attached updated HOWTO with specific information for Debian
users, and a patch to git to git-http-push since initially WebDAV gave
me MOVE 22/404 errors.

--
Rutger Nijlunsing ---------------------------------- eludias ed dse.nl
never attribute to a conspiracy which can be explained by incompetence
----------------------------------------------------------------------

commit bd1ba734176277034c6e4b33eb68fde170286538
Author: Rutger Nijlunsing <[email-masked]>
Date:   Tue Aug 8 14:17:38 2006 +0200

    http-push: Use '_token' instead of '.token' as temporary file before renaming.
    
    WebDAV on Debian unstable cannot handle renames on WebDAV from
    file.ext to newfile (without ext) when newfile* already
    exists. Normally, git creates a file like 'objects/xx/sha1.token',
    which is renamed to 'objects/xx/sha1' when transferred completely.
    
    Just use '_' instead of '.' so WebDAV doesn't see it as an extension
    change.

diff --git a/http-push.c b/http-push.c
index 4021e7d..d45733e 100644
--- a/http-push.c
+++ b/http-push.c
@@ -530,7 +530,7 @@ static void start_put(struct transfer_re
 	request->dest = xmalloc(strlen(request->url) + 14);
 	sprintf(request->dest, "Destination: %s", request->url);
 	posn += 38;
-	*(posn++) = '.';
+	*(posn++) = '_';
 	strcpy(posn, request->lock->token);
 
 	slot = get_active_slot();