Re: [RFC PATCH 0/4] deny push to current branch of non-bare repo
- From
Jeff King <peff@peff.net>
- Date
- Nov 13, 2008, 05:37 UTC
- Message-ID
- <20081113053735.GA5343@coredump.intra.peff.net>
- In-Reply-To
- <f73f7ab80811122122i4ae3ba6dn2ceb314b86660a70@mail.gmail.com>
On Thu, Nov 13, 2008 at 12:22:20AM -0500, Kyle Moffett wrote:
Show 8 quoted lines
> somebody to push something for me to test, they push directly to that > repo, and when I'm done playing with a previous run I just do: > > $ git checkout new/branch/to/test > $ make clean > $ ./configure > $ make > $ make check
OK, I see how using a detached HEAD makes sense. But I think just going straight to a detached HEAD might make even more sense. With your proposed behavior, you need to be prepared to unexpectedly and asynchronously move to a detached HEAD at any time, so why not just start there in the first place?
And then the "push to current branch" problem is neatly solved: you have no current branch.
So:
$ git checkout new/branch/to/test^0 $ make, configure, etc
-Peff