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

Re: Git changes permissions on directories when deleting files.

From
Jeff King <peff@peff.net>
Date
Mar 1, 2011, 20:57 UTC
Message-ID
<20110301205702.GA21429@sigill.intra.peff.net>
In-Reply-To
<AANLkTinkjhH6YR7VPC0hji9CK=qeQMAYr+ptJE3szUyR@mail.gmail.com>
On Tue, Mar 01, 2011 at 03:39:10PM -0500, Computer Druid wrote:
Show 12 quoted lines
> > I'll do that, but it will probably take a long long time for me to see
> > the patch.  I'm hoping there's some cheap hack I can use to work
> > around it in the meantime.
> 
> A simple answer to preventing git from calling rmdir would be to run
> rm and git rm separately:
> $ rm file
> $ git rm --cached -f file
> 
> But that doesn't solve the misbehavior of git under the previous
> scenario. I'm not sure if this is something we should fix in git or if
> it should be fixed in cifs.

That will fix some instances. But git will rmdir to clean up anytime it removes content. That includes during a merge or patch application. So you can't really get around those cases.

-Peff
Previous: Computer DruidNext: Matthieu Moy
Message 13 of 19 in “Git changes permissions on directories when deleting files.”
  1. Chad JoanMar 1, 2011
  2. Chad JoanMar 1, 2011
  3. Computer DruidMar 1, 2011
  4. Chad JoanMar 1, 2011
  5. Chad JoanMar 1, 2011
  6. Computer DruidMar 1, 2011
  7. Chad JoanMar 1, 2011
  8. Jeff KingMar 1, 2011
  9. Chad JoanMar 1, 2011
  10. Jeff KingMar 1, 2011
  11. Chad JoanMar 1, 2011
  12. Computer DruidMar 1, 2011
  13. Jeff KingMar 1, 2011
  14. Matthieu MoyMar 1, 2011
  15. Chad JoanMar 1, 2011
  16. Jeff KingMar 1, 2011
  17. Chad JoanMar 3, 2011
  18. Jeff KingMar 3, 2011
  19. Chad JoanMar 11, 2011

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.