Code

[PATCH] check_file_directory_conflict path fix
authorDavid Meybohm <dmeybohmlkml@bellsouth.net>
Fri, 27 May 2005 02:59:10 +0000 (22:59 -0400)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Fri, 27 May 2005 17:34:24 +0000 (10:34 -0700)
commit8310c2c0b585d3ac35a275f795e15fd9887e8b7d
treef6db9be9d431080d9e7f61edb616b8bac8c9618f
parent84c1afd7e7c69c6c3c0677d5ee01925d4c70d318
[PATCH] check_file_directory_conflict path fix

check_file_directory_conflict can give the wrong answers. This is
because the wrong length is passed to cache_name_pos. The length
passed should be the length of the whole path from the root, not
the length of each path subcomponent.

$ git-init-db
defaulting to local storage area
$ mkdir path && touch path/file
$ git-update-cache --add path/file
$ rm path/file
$ mkdir path/file && touch path/file/f
$ git-update-cache --add path/file/f  <-- Conflict ignored
$

Signed-off-by: David Meybohm <dmeybohmlkml@bellsouth.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
read-cache.c