Re: gitweb is no longer a real-time view - Mailing list pgsql-www

From Magnus Hagander
Subject Re: gitweb is no longer a real-time view
Date
Msg-id CABUevEz9zS7QcNcN5RpNGmJd8=b7q+pK9akU5dZ3Snf2XkWJEw@mail.gmail.com
Whole thread Raw
In response to Re: gitweb is no longer a real-time view  (Kevin Grittner <kgrittn@ymail.com>)
List pgsql-www
On Mon, Mar 4, 2013 at 2:52 PM, Kevin Grittner <kgrittn@ymail.com> wrote:
> Magnus Hagander <magnus@hagander.net> wrote:
>
>> Question still remains how then.
>>
>> Normally it should, AFAIK, refuse to do such a push without a --force.
>> But admittedly, I don't know for sure exactly how those more complex
>> setups work.
>>
>> Do you by any chance have any other git settings either in your local
>> or in the repository config?
>>
>> Also, can someone who knows how that stuff is set up, explain why it's
>> pushing anonymous/master in this case? Seems like it should just push
>> the actual branch, no? Are those instructions for usage wrong?
>>
>>
>>> kgrittn@Kevin-Desktop:~/pg/postgresql.git$ git remote --verbose
>>> origin  ssh://git@gitmaster.postgresql.org/postgresql.git (fetch)
>>> origin  ssh://git@gitmaster.postgresql.org/postgresql.git (push)
>>> kgrittn@Kevin-Desktop:~/pg/postgresql.git$ cd ../master
>>> kgrittn@Kevin-Desktop:~/pg/master$ pull
>>> remote: Counting objects: 31, done.
>>> remote: Compressing objects: 100% (16/16), done.
>>> remote: Total 16 (delta 15), reused 0 (delta 0)
>>> Unpacking objects: 100% (16/16), done.
>>> From /home/kgrittn/pg/postgresql
>>>   + 3a21ef1...b15a6da master    -> origin/master  (forced update)
>>
>> ^^ there's another forced update. Which seems to indicate that your
>> git is doing forced updates by default in both directions.
>>
>> I have no idea how it would do that by default - I've always received
>> an error when accidentally doing something like that...
>
> Are there any files to look at besides these?:
>
> kgrittn@Kevin-Desktop:~/pg/master$ cat ~/.gitconfig
> [user]
>         name = Kevin Grittner
>         email = kgrittn@postgresql.org
> [core]
>         excludesfile = /home/kgrittn/.gitexcludesfile
>         pager = less -x4
>     editor = vim
> kgrittn@Kevin-Desktop:~/pg/master$ cat .git/config
> [core]
>         repositoryformatversion = 0
>         filemode = true
>         bare = false
>         logallrefupdates = true
> [remote "origin"]
>         fetch = +refs/heads/master:refs/remotes/origin/master
>         url = /home/kgrittn/pg/postgresql
> [branch "master"]
>         remote = origin
>         merge = refs/heads/master
>         rebase = true
> [remote "github"]
>         url = git@github.com:kgrittn/postgres.git
>         fetch = +refs/heads/*:refs/remotes/github/*
> kgrittn@Kevin-Desktop:~/pg/master$ cat ../postgresql.git/config
> [core]
>         repositoryformatversion = 0
>         filemode = true
>         bare = true
> [remote "origin"]
>         fetch = +refs/*:refs/*
>         mirror = true

^^ that's your problem.

AFAICT, that one sets it to be force-always.


>         url = ssh://git@gitmaster.postgresql.org/postgresql.git
>
> The rebase option was something I did because the Wiki instructions
> told me to:
>
>
http://wiki.postgresql.org/wiki/Committing_with_Git#Dependent_Clone_per_Branch.2C_Pushing_and_Pulling_From_a_Local_Repository
>
> I don't think there is anything there which wasn't done per
> instructions, but maybe the Wiki needs a fix?

Yea, I'm pretty sure that --mirror thing is the cause of the problem.

Of course, we shuld deploy protect on the server against this, but
that's only going to cause the procedure to *fail* rather than
owerwrite the repo. It still need to be fixed.


-- Magnus HaganderMe: http://www.hagander.net/Work: http://www.redpill-linpro.com/



pgsql-www by date:

Previous
From: Kevin Grittner
Date:
Subject: Re: gitweb is no longer a real-time view
Next
From: Alvaro Herrera
Date:
Subject: Re: gitweb is no longer a real-time view