git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Deleting the "current" branch in remote bare repositories
@ 2009-02-07 15:27 Jan Krüger
  2009-02-07 22:05 ` Felipe Contreras
  0 siblings, 1 reply; 29+ messages in thread
From: Jan Krüger @ 2009-02-07 15:27 UTC (permalink / raw)
  To: Git ML; +Cc: obrien654j

Hi everyone,

recently on IRC we had a case where someone had accidentally deleted
the "current" branch (i.e. thing pointed to by HEAD) by using "git push
origin :master". This broke the remote HEAD as well as the local
refs/remotes/origin/HEAD. Not good. I think we want to make it harder
to get into this situation.

Personally, without being aware of any potential counterindications, I
think the best solution from a usability point of view would
be to have receive-pack reject deletions of what's currently in HEAD.
The question is, of course: how do we go about situations where someone
actually wants to delete the branch HEAD points at?

1. reject deletion and point out a command to change HEAD first (I
don't think we've got a command to do this remotely; do we want one?)

2. automatically change HEAD to something else if there's any other
branch (eww)

3. accept the deletion but warn the user that she just broke the
repository (especially eww because it also breaks the local tracking
ref)

Any smart ideas?
-Jan

^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2009-02-11 18:43 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-07 15:27 Deleting the "current" branch in remote bare repositories Jan Krüger
2009-02-07 22:05 ` Felipe Contreras
2009-02-08  0:18   ` Jan Krüger
2009-02-08  8:44     ` Jeff King
2009-02-08  9:42     ` Junio C Hamano
2009-02-08 11:18       ` Jeff King
2009-02-08 19:05         ` Junio C Hamano
2009-02-09  9:09           ` [PATCH 0/6] Deleting the "current" branch in a remote repository Junio C Hamano
2009-02-09  9:09             ` [PATCH 1/6] builtin-receive-pack.c: do not initialize statics to 0 Junio C Hamano
2009-02-09  9:09               ` [PATCH 2/6] t5400: allow individual tests to fail Junio C Hamano
2009-02-09  9:09                 ` [PATCH 3/6] receive-pack: receive.denyDeleteCurrent Junio C Hamano
2009-02-09  9:09                   ` [PATCH 4/6] remote prune: warn dangling symrefs Junio C Hamano
2009-02-09  9:09                     ` [PATCH 5/6] Warn use of "origin" when remotes/origin/HEAD is dangling Junio C Hamano
2009-02-09  9:09                       ` [PATCH 6/6] receive-pack: default receive.denyDeleteCurrent to refuse Junio C Hamano
2009-02-09 19:15                     ` [PATCH 4/6] remote prune: warn dangling symrefs Jeff King
2009-02-11 17:30                       ` Junio C Hamano
2009-02-11 18:35                         ` Jeff King
2009-02-11 18:42                           ` Jeff King
2009-02-09 18:53                   ` [PATCH 3/6] receive-pack: receive.denyDeleteCurrent Jeff King
2009-02-09 19:22                     ` Jeff King
2009-02-09 21:38                       ` Junio C Hamano
2009-02-10 12:07                         ` Jeff King
2009-02-10 15:15                           ` Junio C Hamano
2009-02-09 18:46                 ` [PATCH 2/6] t5400: allow individual tests to fail Jeff King
2009-02-09 19:08                   ` Junio C Hamano
2009-02-09 21:39                     ` Junio C Hamano
2009-02-10 12:01                       ` Jeff King
2009-02-09 18:28           ` Deleting the "current" branch in remote bare repositories Jeff King
2009-02-09 18:36             ` Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).