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

Re: Error: unable to unlink ... when using "git gc"

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 6, 2009, 08:59 UTC
Message-ID
<7vy6xohkt2.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<488807870901052300y57f59b90rdc03cc47c790b416@mail.gmail.com>
"Johnny Lee" <johnnylee194@gmail.com> writes:
Show 6 quoted lines
> While I'm looking at these "unable to unlink" files, it seems they are
> read only:
> git@tomato:~/golf$ ls -l .git/objects/16/
> total 4
> -r--r--r-- 1 johnny johnny 26 2009-01-05 09:25
> b14f5da9e2fcd6f3f38cc9e584cef2f3c90ebe

Check "ls -ld .git/objects/16" and see if it is owned by you and writable by you.

In sane POSIX filesystem semantics, it should not pose with problem with respect to removal that a file is unwritable.

What counts is the writability of the parent directory.
Previous: Jeff KingNext: Johnny Lee
Message 3 of 17 in “Error: unable to unlink ... when using "git gc"”
  1. Johnny LeeJan 6, 2009
  2. Jeff KingJan 6, 2009
  3. Junio C HamanoJan 6, 2009
  4. Johnny LeeJan 6, 2009
  5. Matthieu MoyJan 6, 2009
  6. Jeff KingJan 6, 2009
  7. Johnny LeeJan 6, 2009
  8. Sitaram ChamartyJan 6, 2009
  9. Johnny LeeJan 6, 2009
  10. Sitaram ChamartyJan 6, 2009
  11. Jeff KingJan 7, 2009
  12. Boyd Stephen Smith Jr.Jan 7, 2009
  13. Sitaram ChamartyJan 7, 2009
  14. Sitaram ChamartyJan 7, 2009
  15. Boyd Stephen Smith Jr.Jan 7, 2009
  16. Sitaram ChamartyJan 7, 2009
  17. Boyd Stephen Smith Jr.Jan 7, 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.