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

Re: [PATCH] Switch receive.denyCurrentBranch to "refuse"

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jan 30, 2009, 14:11 UTC
Message-ID
<alpine.DEB.1.00.0901301429010.3586@pacific.mpi-cbg.de>
In-Reply-To
<20090130025546.GA18257@coredump.intra.peff.net>
Hi,
On Thu, 29 Jan 2009, Jeff King wrote:
Show 12 quoted lines
> On Fri, Jan 30, 2009 at 01:34:28AM +0100, Johannes Schindelin wrote:
> 
> > 	Let's be honest here, I have not much respect for users who fail 
> > 	to read up enough to understand what they are doing.
> > 
> > 	But hearing from those users constantly is really unnerving.  And 
> > 	it would be a one-time cost to old-timers.
> 
> I am not personally opposed to changing this default. I seem to
> recall some opposition when this was brought up initially, but I don't
> recall any specific reason besides "change is bad". Maybe those who
> oppose want to summarize their arguments here.

We like to play it safe when changing behavior that does not meet expectations of old-timers.

For example, all those early adopters who have forks of the linux-2.6 repository (and probably that repository itself, too) do not have core.bare set.

So whenever an old-timer would upgrade to a new Git _with_ my patch, they would need to change their setup.

A one-time cost.

And far easier to accomodate than the push for non-dashed commands (which people still seem to grumble about, even if they should have realized by now that calling Git through the wrapper exclusively brings so many advantages).

Show 5 quoted lines
> I was hoping that introducing the warning would cause new users to "get 
> it". But since this warning was put in place, I think we have still 
> gotten a few questions on the list about this. I don't know if it simply 
> because they are on older versions, or if the warning is insufficient. 
> If the former, then perhaps that argues for leaving it a little longer.
I would argue it is because users cannot read :-)
Show 5 quoted lines
> >  	case DENY_REFUSE:
> > -		if (!is_ref_checked_out(name))
> > +		if (is_bare_repository() || !is_ref_checked_out(name))
> 
> Now what is this change about?
I missed the fact that is_ref_checked_out() already checked for that.
Show 14 quoted lines
> > --- a/t/t5701-clone-local.sh
> > +++ b/t/t5701-clone-local.sh
> > @@ -119,7 +119,7 @@ test_expect_success 'bundle clone with nonexistent HEAD' '
> >  test_expect_success 'clone empty repository' '
> >  	cd "$D" &&
> >  	mkdir empty &&
> > -	(cd empty && git init) &&
> > +	(cd empty && git init && git config receive.denyCurrentBranch false) &&
> >  	git clone empty empty-clone &&
> >  	test_tick &&
> >  	(cd empty-clone
> 
> Perhaps some of these tests would do better to actually just use a bare
> repository.

Right. I just ran out of time, but did not want to hide the patch from the community.

> That would better match the expected workflow for cloning empty, anyway.

Well, I did not want to mix up the two of them. Besides, I have this patch in my personal tree for quite some time now, always wanting to clean it up enough to send it...)

Ciao, Dscho

Previous: Jeff KingNext: Johannes Sixt
Message 11 of 43 in “Switch receive.denyCurrentBranch to "refuse"”
  1. Switch receive.denyCurrentBranch to "refuse"Johannes Schindelin, Jan 30, 2009
  2. Jay SoffianJan 30, 2009
  3. Asheesh LaroiaJan 30, 2009
  4. Dave AbrahamsApr 13, 2010
  5. Junio C HamanoApr 13, 2010
  6. Miklos VajnaJan 30, 2009
  7. Johannes SchindelinJan 30, 2009
  8. Miklos VajnaFeb 11, 2009
  9. Junio C HamanoFeb 11, 2009
  10. Jeff KingJan 30, 2009
  11. Johannes SchindelinJan 30, 2009
  12. Johannes SixtJan 30, 2009
  13. Jeff KingJan 30, 2009
  14. Johannes SchindelinJan 30, 2009
  15. Jeff KingJan 30, 2009
  16. Jay SoffianJan 30, 2009
  17. Jeff KingJan 30, 2009
  18. Johannes SchindelinJan 30, 2009
  19. Jay SoffianJan 30, 2009
  20. Johannes SchindelinJan 30, 2009
  21. Nanako ShiraishiJan 31, 2009
  22. Junio C HamanoFeb 1, 2009
  23. Junio C HamanoFeb 1, 2009
  24. Jeff KingFeb 2, 2009
  25. Junio C HamanoFeb 3, 2009
  26. Junio C HamanoFeb 3, 2009
  27. Jeff KingFeb 6, 2009
  28. Junio C HamanoFeb 7, 2009
  29. Junio C HamanoFeb 3, 2009
  30. Jeff KingFeb 3, 2009
  31. Junio C HamanoFeb 3, 2009
  32. Junio C HamanoFeb 1, 2009
  33. Sam VilainFeb 1, 2009
  34. Junio C HamanoFeb 1, 2009
  35. Sam VilainFeb 2, 2009
  36. Junio C HamanoFeb 2, 2009
  37. Sam VilainFeb 2, 2009
  38. Johannes SchindelinFeb 1, 2009
  39. Junio C HamanoFeb 1, 2009
  40. Junio C HamanoJan 30, 2009
  41. Johannes SchindelinJan 30, 2009
  42. Jeff KingJan 30, 2009
  43. Johannes SchindelinJan 30, 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.