[ANNOUNCE] Example Cogito Addon - cogito-bundle
Linus Torvalds
torvalds at osdl.org
Fri Oct 20 18:59:09 BST 2006
On Fri, 20 Oct 2006, Jakub Narebski wrote:
>
> If I remember correctly, git decided on contents (plus filename)
> similarity based renames detection because 1), it is more generic
> as it covers (or can cover) contents moving not only wholesome rename
> of a file, and 2) because file-id based renames handling works only
> if you explicitely use SCM command to rename file, which is not the
> case of non-SCM-aware channel like for example patches (and accepting
> ordinary patches is important for Linux kernel, the project git was
> created for).
There are lots of problems with file ID's. One of the more obvious ones is
indeed that if you arrive at the same state two different ways (eg patches
vs "native SCM"), you end up with two fundmanetally different trees. Even
though clearly there was no real difference.
There are other serious problems. For example, file-ID based systems
invariably have _huge_ problems with handling two branches deleting and
renaming things differently, and we had several issues with that during
the BK days (ie two people would move files differently, and ending up
with different file ID's for the same path, and merging that inevitably
causes problems not just during the merge, but ever after, since one of
the file ID's will then have to be "deleted" even though it might be
active in one of the branches).
Finally, file-ID based systems fundamentally cannot handle some simple and
interesting cases, like partial content movement. We're starting to see
git actually being able to track file content moving between files: even
when the files themselves didn't move (ie Junio's "git pickaxe" work could
do things like that).
And there really aren't as many advantages to tracking renames as people
claim. The biggest advantage of tracking renames is to avoid the trap that
CVS fell into: being file-ID based _and_ not being able to track the file
ID moving is clearly the worst of all worlds.
So for anybody coming from a CVS background, tracking renames explicitly
is a _huge_ advantage, which is, I think, why some SCM people have gotten
so hung up about them. It's just that if you don't have the file-ID
problem in the first place (and git doesn't), then rename tracking doesn't
actually make any sense, and only makes things much worse.
Linus
More information about the bazaar
mailing list