Re: [RFC PATCH 0/4] deny push to current branch of non-bare repo
- From
- Kyle Moffett <kyle@moffetthome.net>
- Date
- Nov 12, 2008, 00:44 UTC
- Message-ID
- <f73f7ab80811111644y14f0e0ccweed44440356a6508@mail.gmail.com>
- In-Reply-To
- <20081109014926.GA31276@coredump.intra.peff.net>
On Sat, Nov 8, 2008 at 8:49 PM, Jeff King <peff@peff.net> wrote:
Show 8 quoted lines
> 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