# Wierd git over http behaviour

4 messages from 2009-02-20 to 2009-02-24. Participants: John Williams, Junio C Hamano, Sverre Rabbelier.
Thread: https://gitlist.dev/t/17914

## John Williams, 2009-02-20 06:13

Subject: Wierd git over http behaviour
Message-ID: <1d3f23370902192213g560020b3h7a2459c1439e5e5c@mail.gmail.com>
URL: https://gitlist.dev/e/1d3f23370902192213g560020b3h7a2459c1439e5e5c%40mail.gmail.com

```
Hi,

We have a git tree that accesses fine via the git protocol, however I have
also opened up http support for it as some of our users are behind
git-unfriendly corporate firewalls.

I know http transport is not encouraged, but not much I can do about that.

Strange thing is, when doing an http fetch of said tree, it gets no updates
to the tree later than about Jan 13 this year, even though the tree itself
has many, many commits since then (its origin is Linus's tree and we pull
regularly).  Heads created later than that date are also not visible (doing
git branch -a) in the clone pulled over http.  Clones made using git: are
fine.

Anything I can look for in the .git repo on the server, permissions or
similar that might be relevant?  It's almost like there's a single commit in
there that somehow is making the http fetch puke.  If you browse the http
tree with a web browser, it's all there as expected.

For reference here are the URLs:

git://developer.petalogix.cmo/linux-2.6-microblaze

http://developer.petalogix.com/git2/linux-2.6-microblaze

Initially the http reference was a symlink on the server to the actual git
tree, but I also tried just rsync'ing it across to /var/www/html/git2 to
make sure it wasn't the symlink breaking things - no change.

Am I misunderstanding something or is this just flakey behaviour of the http
protocol support?

Thanks,

John

```

## Junio C Hamano, 2009-02-20 06:23

Subject: Re: Wierd git over http behaviour
Message-ID: <7vab8hiq3o.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vab8hiq3o.fsf%40gitster.siamese.dyndns.org
In-Reply-To: <1d3f23370902192213g560020b3h7a2459c1439e5e5c@mail.gmail.com>

```
John Williams <john.williams@petalogix.com> writes:

> Strange thing is, when doing an http fetch of said tree, it gets no updates
> to the tree later than about Jan 13 this year, even though the tree itself
> has many, many commits since then (its origin is Linus's tree and we pull
> regularly).  Heads created later than that date are also not visible (doing
> git branch -a) in the clone pulled over http.  Clones made using git: are
> fine.

Most likely you would want to run git-update-server-info from
project.git/hooks/post-update hook.  A sample shipped with git looks like:

    #!/bin/sh
    #
    # An example hook script to prepare a packed repository for use over
    # dumb transports.
    #
    # To enable this hook, rename this file to "post-update".

    exec git-update-server-info

make sure it is executable.

    $ cd linux-2.6-microblaze.git/hooks
    $ ls -l post-update
    $ chmod +x post-update

And then run "git update-server-info" just once in the repository.  I see
it was run on Jan 22nd and not since then, but the latest of your refs
have Feb 19th timestamp.  Every time somebody pushes into this repository,
you would need to run the command, and post-update hook is a standard way
to do so easily.

```

## Sverre Rabbelier, 2009-02-20 06:39

Subject: Re: Wierd git over http behaviour
Message-ID: <bd6139dc0902192239i3c5f196qf890c8b0a6f9ff46@mail.gmail.com>
URL: https://gitlist.dev/e/bd6139dc0902192239i3c5f196qf890c8b0a6f9ff46%40mail.gmail.com
In-Reply-To: <1d3f23370902192224g71270880p84e150af9640dec6@mail.gmail.com>

```
Heya,

On Fri, Feb 20, 2009 at 07:24, John Williams
<john.williams@petalogix.com> wrote:
> On Fri, Feb 20, 2009 at 4:19 PM, Sverre Rabbelier <srabbelier@gmail.com> wrote:
>> This url seems to be broken/dead?
>
> bah - append .git :(
>
> http://developer.petalogix.com/git2/linux-2.6-microblaze.git

Ok, that works :).

-- 
Cheers,

Sverre Rabbelier

```

## John Williams, 2009-02-24 05:45

Subject: Re: Wierd git over http behaviour
Message-ID: <1d3f23370902232145g61bccd67na0024ab81627c5e6@mail.gmail.com>
URL: https://gitlist.dev/e/1d3f23370902232145g61bccd67na0024ab81627c5e6%40mail.gmail.com
In-Reply-To: <7vab8hiq3o.fsf@gitster.siamese.dyndns.org>

```
On Fri, Feb 20, 2009 at 4:23 PM, Junio C Hamano <gitster@pobox.com> wrote:
> John Williams <john.williams@petalogix.com> writes:
>
>> Strange thing is, when doing an http fetch of said tree, it gets no updates
>> to the tree later than about Jan 13 this year, even though the tree itself
>> has many, many commits since then (its origin is Linus's tree and we pull
>> regularly).  Heads created later than that date are also not visible (doing
>> git branch -a) in the clone pulled over http.  Clones made using git: are
>> fine.
>
> Most likely you would want to run git-update-server-info from
> project.git/hooks/post-update hook.  A sample shipped with git looks like:

That was it - thanks for the quick response.

John

```
