What's wrong
The Propagate popup lists every key in repo.SimilarRepoDiffs (ProjectDirector/PopupPropagateFile.cs:41-56). DiffAgainstAll adds a key for every known sibling, including ones that are not cloned (DiffRepos returns an empty dictionary for those). An uncloned repo therefore appears in the popup and can be checked. When it is:
FilePropagation.ResolveDestinations targets <LocalPath>/<file> (FilePropagation.cs:96).
Copy runs Directory.CreateDirectory(directory) (FilePropagation.cs:159), which creates <dev>/<owner>/<repo>/... from nothing.
- The copy succeeds and is logged as a success.
The new folder is not a repository:
UpdateClonedStatus still treats the repo as not cloned (GitCli.IsRepository is false), so the top panel still offers Clone.
git clone refuses the non-empty directory.
GitRepository.IsCloned (GitRepository.cs:22, which checks Directory.Exists) now wrongly returns true.
Evidence
Probe with a real base repo and an uncloned sibling:
popup would list: ktsu-dev.Uncloned
Propagated .../ktsu-dev/Base/.editorconfig to 1 of 1 repos
IsCloned=True IsRepository=False
clone exit 128: fatal: destination path '.../ktsu-dev/Uncloned' already exists and is not an empty directory.
Suggested fix
- Leave uncloned repos out of the propagate list by filtering on
GitCli.IsRepository(LocalPath) or Options.ClonedRepos.ContainsKey(LocalPath).
- In
FilePropagation.Propagate, refuse any destination whose repository root is not a git working tree and report it as a per-repo failure ("not cloned"). Covering that rule in FilePropagationTests keeps it from regressing.
- Consider making
IsCloned use GitCli.IsRepository instead of Directory.Exists.
Acceptance criteria
- Uncloned siblings are either not offered or are reported as "not cloned" failures.
- No directory is created under an uncloned repo's
LocalPath.
- Clone still works afterwards.
What's wrong
The Propagate popup lists every key in
repo.SimilarRepoDiffs(ProjectDirector/PopupPropagateFile.cs:41-56).DiffAgainstAlladds a key for every known sibling, including ones that are not cloned (DiffReposreturns an empty dictionary for those). An uncloned repo therefore appears in the popup and can be checked. When it is:FilePropagation.ResolveDestinationstargets<LocalPath>/<file>(FilePropagation.cs:96).CopyrunsDirectory.CreateDirectory(directory)(FilePropagation.cs:159), which creates<dev>/<owner>/<repo>/...from nothing.The new folder is not a repository:
UpdateClonedStatusstill treats the repo as not cloned (GitCli.IsRepositoryis false), so the top panel still offers Clone.git clonerefuses the non-empty directory.GitRepository.IsCloned(GitRepository.cs:22, which checksDirectory.Exists) now wrongly returns true.Evidence
Probe with a real base repo and an uncloned sibling:
Suggested fix
GitCli.IsRepository(LocalPath)orOptions.ClonedRepos.ContainsKey(LocalPath).FilePropagation.Propagate, refuse any destination whose repository root is not a git working tree and report it as a per-repo failure ("not cloned"). Covering that rule inFilePropagationTestskeeps it from regressing.IsCloneduseGitCli.IsRepositoryinstead ofDirectory.Exists.Acceptance criteria
LocalPath.