Re: buildfarm and git pull

From: Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>
To: Alexander Kuzmenkov <a(dot)kuzmenkov(at)postgrespro(dot)ru>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, v(dot)wagner(at)postgrespro(dot)ru
Subject: Re: buildfarm and git pull
Date: 2018-09-28 14:37:22
Message-ID: 5e70f6e4-e0d3-dde9-0283-c0c148f1c7d2@2ndQuadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 09/27/2018 11:32 AM, Alexander Kuzmenkov wrote:
> Hi Andrew,
>
> I have a question about how buildfarm works with git, could you please
> help? We use buildfarm locally at PGPro to test our branches, and it
> breaks when I rebase and force push to the repository. To get the
> remote changes, buildfarm does 'git checkout .' followed by 'git
> pull', and the latter breaks when the remote branch was rebased.
>
> I was wondering if the buildfarm really has to do 'git pull'? Pull is
> supposed to be used to integrate local changes with remote ones, but
> buildfarm doesn't have any local changes, does it? It just has to
> checkout the remote branch as-is. To do that, when the state of
> working directory is not know, I'd do the following commands:
>
> git fetch # get the remote changes
> git checkout -f <remote>/<branch> # checkout the needed remote branch;
> on conflict, use the remote files
> git reset --hard # revert all modifications in tracked files
> git clean -xfd # recursively delete all unversioned and ignored files
>
> Do you think this approach is correct or am I missing something?
>

possibly. It seems a little violent. We don't do rebase + forced push in
Postgres - it's something of a nono in public repositories according to
my understanding.

Send me a patch and I'll take a look at it.

cheers

andrew

--
Andrew Dunstan https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2018-09-28 14:39:58 Re: Let's stop with the retail rebuilds of src/port/ files already
Previous Message Tom Lane 2018-09-28 14:05:31 Re: pgsql: Build src/port files as a library with -fPIC, and use that in li