Subject: Re: best git practices, was Re: Git User's Survey 2007 unfinished summary continued

From: Andreas Ericsson <[email-masked]>
Date: Thu, 25 Oct 2007 19:10:55 +0200

Karl Hasselström wrote:
> On 2007-10-25 14:46:54 +0200, Andreas Ericsson wrote:
> 
>> error: The branch 'next' is not a strict subset of your current
>> HEAD. If you are sure you want to delete it, run 'git branch -D
>> next'.
>>
>> So you want me to tell all the developers they should use "git
>> branch -D maint" instead, so they can bypass the built-in security
>> checks? No thanks.
> 
> Maybe the solution here is to let "git branch -d" succeed if the
> branch is a subset of HEAD or the branch it is tracking? That way,
> deleting would succeed if upstream has all your commits.
> 

Deleting branches sitting on a ref reachable from any other locally
checked out branch certainly works. Since this is done to protect
commits from being pruned, and prune honors remote tracking branches
when deciding which commits are unreachable, I see no harm in letting
branches pointing to commits reachable from any remote tracking branch
be deleted.

-- 
Andreas Ericsson                   [email-masked]
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231