Re: Caution when removing git branches

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Caution when removing git branches
Дата
Msg-id AANLkTimaJXyZvKkTTEOU6k3GNxi70vyoKj+=45r+Mr7N@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Caution when removing git branches  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: Caution when removing git branches  (Bruce Momjian <bruce@momjian.us>)
Re: Caution when removing git branches  (Magnus Hagander <magnus@hagander.net>)
Re: Caution when removing git branches  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Список pgsql-hackers
On Thu, Jan 27, 2011 at 11:52 AM, Bruce Momjian <bruce@momjian.us> wrote:
> Robert Haas wrote:
>> On Thu, Jan 27, 2011 at 11:41 AM, Bruce Momjian <bruce@momjian.us> wrote:
>> >> Or for that we could just disable branch creation *completely*, and
>> >> then turn off that restriction that one time / year that we actually
>> >> create a branch?
>> >
>> > Well, branch creation can always be undone --- branch removal seems like
>> > the big problem because it can't.
>>
>> As I've repeatedly said, branch removal CAN be undone.  I don't see
>> any evidence that we have an actual problem here that needs worrying
>> about.
>
> OK, someone removes a branch.  If it is still in his local tree, he can
> push it back.  If not, he has to go around and find someone who does
> have it, and who has the most recent copy?  Can master be removed too?

So if someone does this (which does not look at all likely to me):

git push origin :REL9_0_STABLE
git branch -r -D origin/REL9_0_STABLE
git branch -d REL9_0_STABLE

...then, yes, they will need to find someone who has run 'git pull'
since the last change that was made to that branch.  OR they could get
it back from the anonymous mirror of the canonical repository, which
should always be up to date, OR I think there's an automatically
updated mirror on github also.

The master branch can be removed the same as any other one - just
substitute master in place of REL9_0_STABLE in the above commands.
But why would you do such a nutty thing?  Worst case scenario looks to
me like you type the first of those commands and then go "oh crud".
And if any of our 19 committers were unaware of the hazards of
inserting random colons into their git commands, hopefully this
discussion has awakened them to the error of their ways.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Greg Smith
Дата:
Сообщение: Re: Spread checkpoint sync
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Caution when removing git branches