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

Re: [PATCH 3/6] receive-pack: receive.denyDeleteCurrent

From
Jeff King <peff@peff.net>
Date
Feb 9, 2009, 19:22 UTC
Message-ID
<20090209192210.GD27037@coredump.intra.peff.net>
In-Reply-To
<20090209185310.GB27037@coredump.intra.peff.net>
On Mon, Feb 09, 2009 at 01:53:10PM -0500, Jeff King wrote:
Show 12 quoted lines
> On Mon, Feb 09, 2009 at 01:09:22AM -0800, Junio C Hamano wrote:
> 
> > This is a companion patch to the recent 3d95d92 (receive-pack: explain
> > what to do when push updates the current branch, 2009-01-31).
> > 
> > Deleting the current branch from a remote will result in the next clone
> > from it not check out anything, among other things.  It also is one of the
> > cause that makes remotes/origin/HEAD a dangling symbolic ref.  This patch
> > still allows the traditional behaviour but with a big warning, and promises
> > that the default will change to 'refuse' in a future release.
> 
> This patch looks good to me. One comment:

Actually, one more comment on this one. If a user tries to delete the current branch in a non-bare repository, they actually get _both_ gigantic warning messages (one for denyCurrentBranch and one for denyDeleteCurrent).

Should the denyCurrentBranch code be triggering at all on a deletion? That is, if I have:

  [receive]
    denyCurrentBranch = refuse
    denyDeleteCurrent = ignore
should such a deletion be refused or allowed?
-Peff
Previous: Jeff KingNext: Junio C Hamano
Message 20 of 29 in “Deleting the "current" branch in remote bare repositories”
  1. Jan KrügerFeb 7, 2009
  2. Felipe ContrerasFeb 7, 2009
  3. Jan KrügerFeb 8, 2009
  4. Jeff KingFeb 8, 2009
  5. Junio C HamanoFeb 8, 2009
  6. Jeff KingFeb 8, 2009
  7. Junio C HamanoFeb 8, 2009
  8. 0/6 Deleting the "current" branch in a remote repositoryJunio C Hamano, Feb 9, 2009
  9. 1/6 builtin-receive-pack.c: do not initialize statics to 0Junio C Hamano, Feb 9, 2009
  10. 2/6 t5400: allow individual tests to failJunio C Hamano, Feb 9, 2009
  11. 3/6 receive-pack: receive.denyDeleteCurrentJunio C Hamano, Feb 9, 2009
  12. 4/6 remote prune: warn dangling symrefsJunio C Hamano, Feb 9, 2009
  13. 5/6 Warn use of "origin" when remotes/origin/HEAD is danglingJunio C Hamano, Feb 9, 2009
  14. 6/6 receive-pack: default receive.denyDeleteCurrent to refuseJunio C Hamano, Feb 9, 2009
  15. Jeff KingFeb 9, 2009
  16. Junio C HamanoFeb 11, 2009
  17. Jeff KingFeb 11, 2009
  18. Jeff KingFeb 11, 2009
  19. Jeff KingFeb 9, 2009
  20. Jeff KingFeb 9, 2009
  21. Junio C HamanoFeb 9, 2009
  22. Jeff KingFeb 10, 2009
  23. Junio C HamanoFeb 10, 2009
  24. Jeff KingFeb 9, 2009
  25. Junio C HamanoFeb 9, 2009
  26. Junio C HamanoFeb 9, 2009
  27. Jeff KingFeb 10, 2009
  28. Jeff KingFeb 9, 2009
  29. Jeff KingFeb 9, 2009

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.