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, 16:43 UTC
Message-ID
<7v628cfb6h.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20120821061059.GA26516@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
> You can get multiple warnings from this, as some programs read the
> config multiple times. I don't think it's really worth caring about, as
> you would want to fix such a misconfiguration quickly anyway.

I agree that we wouldn't care too much about the multiple warnings, and even if we did, it would be easy to correct. Instead of having a call to warning(_("unable to access..."), path, strerror(errno)) directly in acceess_or_warn(), make that a helper function that is called from there and other places you warn in your other patches, and maintain a small table of already-warned-for paths in the helper, and we are done.

> A bigger question is whether people are stuck living with such a
> misconfiguration (e.g., inaccessible directories made by a clueless
> admin), and would be annoyed at having no way to turn this feature off.

Yes, /etc/gitconfig would certainly have that issue; exclude and attr you deal with your other patches are safe, though.

Modulo the above "you might want to turn the call to warn() to another helper that can be used from elsewhere", this patch looks perfect to me.

Thanks.
Previous: Jeff KingNext: Junio C Hamano
Message 16 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.