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

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Kyle Moffett <kyle@...>
Cc: Junio C Hamano <gitster@...>, <git@...>, Sam Vilain <sam@...>
Date: Friday, November 14, 2008 - 2:37 am

On Thu, Nov 13, 2008 at 08:58:50AM -0500, Kyle Moffett wrote:


If the problem is merely the syntax, then perhaps that argues for "git
checkout -d" to force detaching.


And again, perhaps this argues for a "Detach" option in the GUI.

But I have to admit, this is a pretty infrequently-used use-case. I
detach all the time when looking at non-branches, but I can't think of
the last time I used "ref^0" to detach intentionally.


Or git-receive could even just silently munge the incoming refs when
writing them out (i.e., it exposes "refs/test/*" as "refs/heads/*", and
when you ask to write "refs/heads/foo" it writes "refs/test/foo"
instead).

Though that sort of lying feels a little wrong to me, since the pushing
side will incorrectly update its tracking branches. It wouldn't so bad
if the "fetch" side respected the munging, too.

But again, this seems uncommon enough that it is not worth trying to
implement something too clever.


I think that is a more sensible solution. Your workflow is not about
"sometimes I want to detach the HEAD" but rather "in this particular
repo, we should _always_ detach the HEAD." Which a config option
represents very nicely.

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [RFC PATCH 0/4] deny push to current branch of non-bare ..., Jeff King, (Fri Nov 14, 2:37 am)
Re: [RFC PATCH 0/4] deny push to current branch of non-bare ..., Johannes Schindelin, (Sat Nov 8, 11:12 am)
[PATCH 2/4] t5516: refactor oddball tests, Jeff King, (Fri Nov 7, 6:20 pm)