Re: git-diff-files and fakeroot

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Ryan Anderson <ryan@...>
Cc: <git@...>
Date: Monday, January 16, 2006 - 10:33 pm

Ryan Anderson <ryan@michonline.com> writes:


How does fakeroot keep track of fake ownerships?

That is, I suspect:

	$ date >foo
	$ ls -l foo
	-rw-rw-r--  1 junio junio 29 Jan 16 18:29 foo
	$ fakeroot sh -i
        # ls -l foo
	-rw-rw-r--  1 root root 29 Jan 16 18:29 foo

which means that under fakeroot, stat would give file ownerships
for *my* files as if they are owned by root.

And of course .git/index records the as me and fakeroot has no
way of knowing me maps to root in that fake environment.

"git status" includes "git update-index --refresh", which reads
from the stat bits and ownerships, notices that file contents have
not changed, and writes a new index file that records these stat
bits (so git thinks they are now owned by root).

If you come out of the fakeroot environment, I am reasonably
sure that you would find all the index entries are dirty again,
for exactly the same reason.  index thinks things are owned by
root, the files are owned by you, so without looking at file
contents, it says "these things might have changed".




	

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
git-diff-files and fakeroot, Ryan Anderson, (Mon Jan 16, 10:10 pm)
Re: git-diff-files and fakeroot, Junio C Hamano, (Mon Jan 16, 10:36 pm)
Re: git-diff-files and fakeroot, Ryan Anderson, (Tue Jan 17, 1:27 am)
Re: git-diff-files and fakeroot, Kyle Moffett, (Tue Jan 17, 1:59 am)
Re: git-diff-files and fakeroot, Ryan Anderson, (Tue Jan 17, 2:08 am)
Re: git-diff-files and fakeroot, Sam Ravnborg, (Tue Jan 17, 2:10 pm)
Re: git-diff-files and fakeroot, Junio C Hamano, (Mon Jan 16, 10:33 pm)