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

Re: [RFC PATCH 0/2] Allow adding .git files and directories

From
LSLukas Straub <lukasstraub2@web.de>
Date
Aug 20, 2020, 12:37 UTC
Message-ID
<20200820143755.06d39a05@luklap>
In-Reply-To
<20200819201736.GA2511157@coredump.intra.peff.net>

On Wed, 19 Aug 2020 16:17:36 -0400 Jeff King <peff@peff.net> wrote:

Show 21 quoted lines
> On Wed, Aug 19, 2020 at 12:09:11PM -0700, Junio C Hamano wrote:
> 
> > "Randall S. Becker" <rsbecker@nexbridge.com> writes:
> >   
> > > Just putting my CSIO hat on here. We would need a system-wide setting to
> > > prohibit users from using this capability.  
> > 
> > Or just discard this patch, which is a lot simpler.  I don't see any
> > need for this one.  
> 
> Yes. Configurability is a lot more complicated than you might think.
> Because it's not just system-wide, but _ecosystem_ wide.
> 
> Right now git-fsck complains about ".git" appearing in a tree, and that
> check blocks people from pushing such trees to any hosting sites that
> enable transfer.fsckObjects (which includes hosters like GitHub). So
> you'd not only need to allow the behavior to be loosened for all of the
> people using the feature, but you'd need to convince server-side hosters
> to loosen their config. And because part of the purpose is to protect
> downstream clients from attacks, I doubt that public hosters like GitHub
> would do so.

I guess they can add a checkbox to their (secured) web-ui to configure this.

Show 8 quoted lines
> It _could_ still be useful in a more isolated environment (e.g., your
> company server that is serving only internal repos to employees). But I
> have misgivings about a feature that lets people intentionally create
> repositories whose history cannot ever interact with other users who
> haven't set a special config flag. It's one thing to say "to take
> advantage of this feature, we must all agree to have version X, or set
> flag Y". But it's another to bake that restriction into the repository
> history for all time.

Good point. I don't know how we can resolve this, so I will add warning about this (and the security concerns) to the config docs.

In the worst-case where the hosting sites don't adopt this config, the user enables and uses this feature despite the warnings and then wants to use a hosting site, he can still rewrite the history. Not nice, but no disaster either.

Regards, Lukas Straub

> 
> -Peff
Previous: Johannes SchindelinNext: Jeff King
Message 22 of 27 in “Allow adding .git files and directories”
  1. 0/2 Allow adding .git files and directoriesLukas Straub, Aug 19, 2020
  2. 2/2 dir: Recurse into nested git repos if they aren't submodulesLukas Straub, Aug 19, 2020
  3. 1/2 dir/read-cache: Allow adding .git files and directoriesLukas Straub, Aug 19, 2020
  4. Junio C HamanoAug 19, 2020
  5. Randall S. BeckerAug 19, 2020
  6. Junio C HamanoAug 19, 2020
  7. Randall S. BeckerAug 19, 2020
  8. Jeff KingAug 19, 2020
  9. Junio C HamanoAug 19, 2020
  10. Jeff KingAug 19, 2020
  11. Randall S. BeckerAug 19, 2020
  12. Johannes SchindelinAug 20, 2020
  13. Lukas StraubAug 20, 2020
  14. Jeff KingAug 20, 2020
  15. Lukas StraubAug 21, 2020
  16. Randall S. BeckerAug 21, 2020
  17. brian m. carlsonAug 21, 2020
  18. Lukas StraubAug 22, 2020
  19. brian m. carlsonAug 22, 2020
  20. Lukas StraubAug 22, 2020
  21. Johannes SchindelinAug 24, 2020
  22. Lukas StraubAug 20, 2020
  23. Jeff KingAug 20, 2020
  24. Lukas StraubAug 19, 2020
  25. Lukas StraubAug 19, 2020
  26. Randall S. BeckerAug 19, 2020
  27. Lukas StraubAug 20, 2020

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.