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

Re: receive.denyNonNonFastForwards not denying force update

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 21, 2012, 03:49 UTC
Message-ID
<7vpq6kgazt.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20120821015738.GA20271@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 10 quoted lines
> On Mon, Aug 20, 2012 at 06:22:26PM -0700, Junio C Hamano wrote:
>
>> Does anybody recall if this is something we did on purpose?  After
>> eyeballing the callchain starting from cmd_receive_pack() down to
>> receive_pack_config(), nothing obvious jumps at me.
>
> No, I do not think it was on purpose. And it would be very hard to do
> so, anyway; config callbacks are not given any information about the
> source of the config variable, and cannot distinguish between repo,
> global, and system-level config variables.

I was looking for setenv() to refuse system wide defaults; that actually is fairly simple.

Show 5 quoted lines
>> Could this be caused by a chrooted environment not having
>> /etc/gitconfig (now I am just speculating)?
>
> That seems far more likely to me. Another possibility is that the file
> is not readable by the user running receive-pack.

Good point. We explicitly use access(R_OK) and pretend as if a path that is known to exist but not readable is missing; perhaps we may want to diagnose this as a misconfiguration and issue a warning?

Previous: Jeff KingNext: Jeff King
Message 9 of 20 in “receive.denyNonNonFastForwards not denying force update”
  1. John ArthorneAug 20, 2012
  2. Junio C HamanoAug 20, 2012
  3. Sitaram ChamartyAug 21, 2012
  4. Junio C HamanoAug 21, 2012
  5. Brandon CaseyAug 21, 2012
  6. Jay SoffianAug 21, 2012
  7. Junio C HamanoAug 21, 2012
  8. Jeff KingAug 21, 2012
  9. Junio C HamanoAug 21, 2012
  10. Jeff KingAug 21, 2012
  11. Jeff KingAug 21, 2012
  12. Jeff KingAug 21, 2012
  13. Jeff KingAug 21, 2012
  14. Junio C HamanoAug 21, 2012
  15. Jeff KingAug 21, 2012
  16. Junio C HamanoAug 21, 2012
  17. Junio C HamanoAug 21, 2012
  18. Jeff KingAug 21, 2012
  19. Sitaram ChamartyAug 21, 2012
  20. John ArthorneSep 10, 2012

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.