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: Jeff King <peff@...>
Cc: Junio C Hamano <gitster@...>, <git@...>, Sam Vilain <sam@...>
Date: Monday, December 1, 2008 - 10:22 pm

On 11/8/08, Jeff King <peff@peff.net> wrote:

I do not think that having a work-flow different from yours deserves a
"somewhat insane" label. But let us consider the consequences of
banning push into a (current branch) non-bare repo. To propagate
changes to such a non-bare repo there are two remaining alternatives
neither of which is fully satisfactory:

(1) Switch target's current branch to something else (prevent a
conflict) before pushing and then restore it back after the push

(2) Use git-fetch from the target.

Method (1) is no better than what is available today with "git reset
--hard" to sync working directory.
Method (2) is even worse, because git-fetch provides no control of
what branches/tags to fetch, it sucks everything in from all branches.
"git-push", OTOH, can be instructed to be very selective.

Here is an example of such a work-flow

Foo.git -- main bare repo of the project
Foo.wip -- everyday "work in progress" repo. Cloned from Foo.git.
Pushes to Foo.git
Foo.wip.insane -- experimental "crazy" stuff cloned from Foo.wip.
Pushed to Foo.wip

Proposed patch makes this work flow impossible (cannot push from
Foo.wip.insane to Foo.wip)

--Leo--
--
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 ..., Leo Razoumov, (Mon Dec 1, 10:22 pm)
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)