[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: deleting invisible files in git

From: Anthony W. Youngman
Subject: Re: deleting invisible files in git
Date: Tue, 27 Feb 2007 11:17:07 +0000
User-agent: Turnpike/6.05-U (<4sU6TxOQPTi8g0mvSqc+2O8Kvd>)

In message <address@hidden>, Graham Percival <address@hidden> writes
Evidently git is intelligent enough to realize that the Capitalized files are duplicates of the lower-case (does it handle symlinks?), but now I can't get rid of them.

No - afaik git does NOT handle symlinks.

If I've got it right, duplicate files are impossible in git. Don't forget - Linus thinks in linux mode and is used to writing file systems...

When you commit a file to git, it calculates the MD5 hash and uses that as a sort of "inode". So, just as an ls in linux (can) displays the inode which is a pointer to where the file is actually stored, so listing files in git has the MD5 hash which points to where the file is stored ...

You're very unlikely to encounter a "MD5 collision failure" in git, but Linus made the design decision that if two different files had the same MD5, git would simply fall over with an error, and leave the resulting mess to the user to sort out. He made the (imho) very practical decision that the likelihood of a collision was far less than the likelihood of a screw-up in collision-handling code, hence this possible failure.

So once you've succeeded in dumping these duff entries, all you've actually done is remove their line in the git directory :-)

Anthony W. Youngman - address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]