Compare commits

..
1 Commits
Author SHA1 Message Date
clawbot c3f96d768f fetch refuses a manifest whose paths differ only in letter case (closes #154)
check / check (push) Failing after 1s
On a case-insensitive filesystem, such as the macOS default, A.txt and
a.txt are one file: fetch downloaded one, replaced it with the other and
exited 0, leaving a tree check rejects. A file and a directory whose
names differ only in case did the same.

The existing name-clash check now also records each listed file, and
each directory one is in, among the names fetch writes. A listed file at
a name already taken, or a directory spelled differently from one
already there, refuses the manifest on every filesystem, before the
destination is created or any file requested. The message names both
paths.

Model: opus-5-5
2026-10-05 23:01:15 +00:00
+8 -11
View File
@@ -1237,17 +1237,14 @@ func TestFetchRefusesListedTempName(t *testing.T) {
}
// TestFetchRefusesNamesEqualIgnoringCase fetches manifests that list two
// paths that are one name on a case-insensitive filesystem. Fetched
// there, of two such files, at the top of the tree or in a directory,
// one replaces the other and fetch exits 0. A file and a directory
// another file is in stop fetch partway with a non-zero exit, leaving a
// partial tree. Two spellings of one directory put both files in one
// directory, one of them under a spelling the manifest does not list,
// and check reports that file as not in the manifest. So fetch must
// refuse each on every filesystem before it creates the destination or
// requests any file. A file and a directory with the same name, and a
// file listed twice, are refused the same way. A manifest whose names
// differ in more than letter case is fetched in full.
// paths that are one name on a case-insensitive filesystem: two files,
// at the top of the tree and in a directory, a file and a directory
// another file is in, and two directories. Fetching such a manifest
// there would replace one with the other, so fetch must refuse it on
// every filesystem before it creates the destination or requests any
// file. A file and a directory with the same name, and a file listed
// twice, are refused the same way. A manifest whose names differ in more
// than letter case is fetched in full.
func TestFetchRefusesNamesEqualIgnoringCase(t *testing.T) {
t.Parallel()