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
LRLeo Razoumov <slonik.az@gmail.com>
Date
Dec 2, 2008, 02:41 UTC
Message-ID
<ee2a733e0812011841l73fc046dra6434340702fc282@mail.gmail.com>
In-Reply-To
<7vtz9npawn.fsf@gitster.siamese.dyndns.org>
On 12/1/08, Junio C Hamano <gitster@pobox.com> wrote:
Show 36 quoted lines
> "Leo Razoumov" <slonik.az@gmail.com> writes:
>
>  > On 11/8/08, Jeff King <peff@peff.net> wrote:
>  >> On Fri, Nov 07, 2008 at 03:16:53PM -0800, Junio C Hamano wrote:
>  >>
>  >>  > > The FAQ even says "don't do this until you know what you are doing." So
>  >>  > > the safety valve is configurable, so that those who know what they are
>  >>  > > doing can switch it off.
>  >>  >
>  >>  > "We are breaking your existing working setup but you can add a new
>  >>  > configuration to unbreak it" should not be done lightly.  I think as the
>  >>  > end result it is a reasonable thing to aim for for this particular
>  >>  > feature, but we do need a transition plan patch in between that introduces
>  >>  > a step that warns but not forbids.  We can ship 1.6.1 with it and then
>  >>  > switch the default to forbid in 1.6.3, for example.
>  >>
>  >>
>  >> Yeah, I was kind of hoping we could assume that anybody relying on this
>  >>  behavior was somewhat insane, and wouldn't be too upset when it broke.
>  >
>  > 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.
>
>
> (3) set the config in the target repository to allow such a push
>     regardless of the git version.
>
>  Remember, I am in the third camp in this topic myself.

Junio, thanks for supporting the "third way". I am not sure whether I interpret it correctly but in the same thread several message earlier you wrote "We can ship 1.6.1 with it and then switch the default to forbid in 1.6.3, for example". With the default set to "deny" it would be useful if the git-push error message will indicate what config variable to set in order to reverse the denial.

--Leo--
Previous: Junio C HamanoNext: Jeff King
Message 23 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.