git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC PATCH 0/4] deny push to current branch of non-bare repo

From
KMKyle Moffett <kyle@moffetthome.net>
Date
Nov 13, 2008, 05:22 UTC
Message-ID
<f73f7ab80811122122i4ae3ba6dn2ceb314b86660a70@mail.gmail.com>
In-Reply-To
<20081112084412.GA3860@coredump.intra.peff.net>
On Wed, Nov 12, 2008 at 3:44 AM, Jeff King <peff@peff.net> wrote:
Show 10 quoted lines
> On Tue, Nov 11, 2008 at 07:44:06PM -0500, Kyle Moffett wrote:
>> 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.
>
> A neat idea, but I'm not sure what workflow that is meant to support.

Basically, I have a remote tree on a fast multicore box used for runs of a test suite on various peoples different branches. When I want 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

Occasionally I notice a bug which I want to temporarily fix to let the build continue, even though I will need to have the author merge that fix as a part of his original buggy patch. If nobody pushes the branch I'm currently testing again, I can "git diff" just fine to see what I had to fix. If somebody pushes to a different branch than the one I'm testing, it's also fine. The inconsistency is pushing to the branch I'm on.

So it would be handy to be able to mark that repository as "detach-HEAD-on-push-of-current-branch", which would let me remember where I was, even if that's not where that branch is anymore.

There are other ways I could probably do something very similar, but since the config option was being added it seemed it would probably be easy to extend. If nobody else is interested in that behavior, I will just keep maintaining my own hook, but I thought I'd mention it.

Cheers, Kyle Moffett

Previous: Jeff KingNext: Jeff King
Message 16 of 25 in “deny push to current branch of non-bare repo”
  1. 0/4 deny push to current branch of non-bare repoJeff King, Nov 7, 2008
  2. 1/4 t5400: expect success for denying deletionJeff King, Nov 7, 2008
  3. Jan KrügerNov 9, 2008
  4. 2/4 t5516: refactor oddball testsJeff King, Nov 7, 2008
  5. 3/4 tests: avoid pushing to current branch of non-bare repoJeff King, Nov 7, 2008
  6. 4/4 receive-pack: deny push to current branch of non-bare repoJeff King, Nov 7, 2008
  7. Mark BurtonNov 7, 2008
  8. Junio C HamanoNov 7, 2008
  9. Jeff KingNov 8, 2008
  10. Johannes SchindelinNov 8, 2008
  11. Junio C HamanoNov 8, 2008
  12. Jeff KingNov 9, 2008
  13. Junio C HamanoNov 9, 2008
  14. Kyle MoffettNov 12, 2008
  15. Jeff KingNov 12, 2008
  16. Kyle MoffettNov 13, 2008
  17. Jeff KingNov 13, 2008
  18. Junio C HamanoNov 13, 2008
  19. Kyle MoffettNov 13, 2008
  20. Jeff KingNov 14, 2008
  21. Leo RazoumovDec 2, 2008
  22. Junio C HamanoDec 2, 2008
  23. Leo RazoumovDec 2, 2008
  24. Jeff KingDec 2, 2008
  25. Leo RazoumovDec 2, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.