This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Description
When I create a junction to a directory within a git repository and run git clean -d, the underlying files in the directory being pointed to by the junction gets deleted.
To reproduce:
- Using git bash, create a folder with a file that will later be a junction in a git repository.
mkdir afolder
echo "some text" > afile.txt
-
Using git bash, create a repository
git init arepo
-
Using windows command prompt, navigate to the repository and create a junction to the folder created in step 1.
mklink /J C:\arepo\junctionfolder C:\afolder
-
Run git clean
git clean -df
The file created in step 1 has been deleted. Should git clean -d stop when it encounters a junctioned directory and only delete the junction and not all the files in the junction?