Re: Caution when removing git branches - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: Caution when removing git branches
Date
Msg-id AANLkTin9F4L_QzmgmU=0E6w4fhWrdrLB_-69c6H8RmEV@mail.gmail.com
Whole thread Raw
In response to Re: Caution when removing git branches  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: Caution when removing git branches  (Robert Haas <robertmhaas@gmail.com>)
Re: Caution when removing git branches  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Wed, Jan 26, 2011 at 17:37, Andrew Dunstan <andrew@dunslane.net> wrote:
>
>
> On 01/26/2011 11:26 AM, Bruce Momjian wrote:
>>
>> For those of you using git, I wanted to point out that it is fairly easy
>> to remove git branches.  For example, I can easily remove a branch on
>> my github repository using:
>>
>>        $ git branch -d :branch_name
>>
>> I don't believe that is revertable.  What is scarey is that this could
>> be done on our 'origin' as well.
>>
>
> The ability to remove branches is a feature. I strongly encourage you to
> create topic branches for development work, then merge them onto the main
> branch, and then delete them. I almost never work directly on, say,
> REL9_0_STABLE or master, except for quite trivial changes.
>
> I thought we had some hooks on gitmaster to help prevent accidents like
> inadvertent branch deletion.

We have hooks to prevent a number of things, but not the removal of
branches (or tags). We'll send an email to committers telling you it's
been done, but we don't prevent it.

It would probably be pretty easy to add a hook preventing it though -
do we want that? (we could still delete branches of course - but it
would require an admin to do it directly on the git server, which is
highly unlikely to happen by mistake)

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


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Re: In pg_test_fsync, use K(1024) rather than k(1000) for write size units.
Next
From: "Kevin Grittner"
Date:
Subject: Re: Re: In pg_test_fsync, use K(1024) rather than k(1000) for write size units.