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

git clean -d deletes files in junctioned directories on windows #81

Closed
jdebbink opened this issue Jun 25, 2013 · 1 comment
Closed

git clean -d deletes files in junctioned directories on windows #81

jdebbink opened this issue Jun 25, 2013 · 1 comment

Comments

@jdebbink
Copy link

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:

  1. 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
  1. Using git bash, create a repository
    git init arepo

  2. 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

  3. 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?

@dscho
Copy link
Member

dscho commented Dec 30, 2013

I am afraid that support for junctions is out of the scope of any currently-active Git for Windows developer.

@dscho dscho closed this as completed Dec 30, 2013
dscho pushed a commit to dscho/git that referenced this issue Jul 18, 2022
	* Makefile.am (MAKETESTS): New variable split out of TESTS.
	(CLEANFILES): Replace TESTS with BUILDTESTS and MAKETESTS.
	* Makefile.in: Regenerate.

Fixes msysgit#81
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants