From: Kyle Moffett Date: Wed, 12 Nov 2008 00:44:06 GMT Subject: Re: [RFC PATCH 0/4] deny push to current branch of non-bare repo Message-ID: In-Reply-To: <20081109014926.GA31276@coredump.intra.peff.net> On Sat, Nov 8, 2008 at 8:49 PM, Jeff King wrote: > The behavior is configurable via receive.denyCurrentBranch, > defaulting to "warn" so as not to break existing setups > (though it may, after a deprecation period, switch to > "refuse" by default). For users who know what they are doing > and want to silence the warning (e.g., because they have a > post-receive hook that reconciles the HEAD and working > tree), they can turn off the warning by setting it to false > or "ignore". Hmm, I wonder if it would be possible to also add a "detach" variant; which would create a detached-HEAD at the current commit when automatically receiving a push to the working branch. I have a post-receive script that does so right now on a couple repositories. It's still a little confusing to someone actively working in the repository being pushed to, but it's much easier to explain than the current default behavior. Cheers, Kyle Moffett