Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing untracked files when created in subfolder #369

Closed
wants to merge 2 commits into from

Conversation

kewillford
Copy link
Member

@kewillford kewillford commented Oct 10, 2018

Add to the test to create multiple level of folders and files in those folder to make sure they show up as untracked files.

Update the git for windows version that has the fix.

Fixes #358

@@ -3,7 +3,7 @@

<PropertyGroup Label="Parameters">
<GVFSVersion>0.2.173.2</GVFSVersion>
<GitPackageVersion>2.20180814.4</GitPackageVersion>
<GitPackageVersion>2.20181009.1-pr</GitPackageVersion>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was the fix in Git?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See microsoft/git#33

A folder entry in the modified paths was not being used as recursive in the case of untracked files. So if there was the entry foo/ in the modified paths, git was not going into any of the folders of foo to look for untracked files.

This had to do with the fact that while using the exclude we were "unexcluding" folders so if we had the file foo/bar/test.txt, we would need the !foo/, !foo/bar/ in order for git to traverse the directories and find the untracked file. We still do that but because we no longer add to the modified paths if there is a parent directory entry, git needs to treat the folder entry as recursive.

@@ -1088,6 +1088,9 @@ private void CommitChangesSwitchBranchSwitchBack(Action fileSystemAction, [Calle
private void CreateFile()
{
this.CreateFile("Some content here", Path.GetRandomFileName() + "tempFile.txt");
this.CreateFolder("foo");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest better names (Level1/Level2?) and constants for these folder names

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

git status does not report untracked files that are more than one folder deep
3 participants