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

Re: git ls-files -o under .git/ prints all repository files

From
APAndy Parkins <andyparkins@gmail.com>
Date
Jan 19, 2007, 09:04 UTC
Message-ID
<200701190904.58515.andyparkins@gmail.com>
In-Reply-To
<7vfya7ju1l.fsf@assigned-by-dhcp.cox.net>
On Friday 2007, January 19 08:32, Junio C Hamano wrote:
> Have you actually read the code to see what 'share' variable
> means there?  It is only false when creating the toplevel .git

Nope. I'm an idiot :-) I assumed it was from the --shared command line argument. What they say about assumptions is true isn't it?

> Nothing unusual.  The code explicitly asks for .git/config by
> name, so that does not involve readdir(".git"), which is what
> the 0333 change prevents from running.

In this case I was talking more about the user editing those files than the code looking for them. I suppose if you know its there then a vim .git/config will be fine.

Show 6 quoted lines
> > On ocassion I've found myself doing
> >   mv .git/refs/remotes/origin .git/refs/remotes/up
> >
> > Which this patch would break.
>
> Does it?

You're right it doesn't. As long as you know the refs directory is there it doesn't stop you changing into it, and messing about in any way you want. I was looking at it from the point of view of how I originally found out about these git inner workings - I did it by poking around in the .git directory.

> You all should not take "amusing" too seriously.  That was a
> tongue-in-cheek patch.

Fair enough. I took it more as meaning, "this would fix this problem /and/ it's funny too". Apologies.

> In other words, I am not sure if there is anything worth fixing.
After a bit of thought; I think I agree.
Andy
-- 
Dr Andrew Parkins, M Eng (Hons), AMIEE
andyparkins@gmail.com
Previous: Junio C HamanoNext: Yasushi SHOJI
Message 5 of 26 in “git ls-files -o under .git/ prints all repository files”
  1. Yasushi SHOJIJan 19, 2007
  2. Junio C HamanoJan 19, 2007
  3. Andy ParkinsJan 19, 2007
  4. Junio C HamanoJan 19, 2007
  5. Andy ParkinsJan 19, 2007
  6. Yasushi SHOJIJan 19, 2007
  7. Simon 'corecode' SchubertJan 19, 2007
  8. Alex RiesenJan 19, 2007
  9. Simon 'corecode' SchubertJan 19, 2007
  10. Alex RiesenJan 19, 2007
  11. Simon 'corecode' SchubertJan 19, 2007
  12. Alex RiesenJan 19, 2007
  13. Simon 'corecode' SchubertJan 19, 2007
  14. Alex RiesenJan 19, 2007
  15. Simon 'corecode' SchubertJan 19, 2007
  16. Andreas EricssonJan 19, 2007
  17. Matthias KestenholzJan 19, 2007
  18. Johannes SchindelinJan 19, 2007
  19. Junio C HamanoJan 19, 2007
  20. Yasushi SHOJIJan 23, 2007
  21. Commands requiring a work tree must not run in GIT_DIRJohannes Schindelin, Jan 23, 2007
  22. Junio C HamanoJan 24, 2007
  23. Johannes SchindelinJan 24, 2007
  24. Junio C HamanoJan 24, 2007
  25. Alex RiesenJan 19, 2007
  26. Alex RiesenJan 19, 2007

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.