Merge branch 'rs/fsck-duplicate-names-in-trees'
The check in "git fsck" to ensure that the tree objects are sorted still had corner cases it missed unsorted entries. * rs/fsck-duplicate-names-in-trees: fsck: detect more in-tree d/f conflicts t1450: demonstrate undetected in-tree d/f conflict t1450: increase test coverage of in-tree d/f detection fsck: fix a typo in a comment
This commit is contained in:
4
fsck.c
4
fsck.c
@ -598,7 +598,7 @@ static int verify_ordered(unsigned mode1, const char *name1,
|
||||
|
||||
/*
|
||||
* There can be non-consecutive duplicates due to the implicitly
|
||||
* add slash, e.g.:
|
||||
* added slash, e.g.:
|
||||
*
|
||||
* foo
|
||||
* foo.bar
|
||||
@ -620,7 +620,7 @@ static int verify_ordered(unsigned mode1, const char *name1,
|
||||
if (!f_name)
|
||||
break;
|
||||
if (!skip_prefix(name2, f_name, &p))
|
||||
break;
|
||||
continue;
|
||||
if (!*p)
|
||||
return TREE_HAS_DUPS;
|
||||
if (is_less_than_slash(*p)) {
|
||||
|
Reference in New Issue
Block a user