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

empty-dirs doesn't respect filters (during merges?) #120

Open
Creat opened this issue Jan 14, 2021 · 0 comments
Open

empty-dirs doesn't respect filters (during merges?) #120

Creat opened this issue Jan 14, 2021 · 0 comments

Comments

@Creat
Copy link

Creat commented Jan 14, 2021

I ran into an issue where I have both --empty-dirs and ignore filters/rules active. The problem now is that during a merge, empty folders are still recreated despite the path matching an action ignore rule. I'm not entirely sure if this also applies on the initial commit of a folder that matches an ignore rule, but includes empty directories.

The specific problem case is that we unfortunately have multiple git-repositories committed into the svn repository that's being converted. This means it contains .git-folders. Obviously I have to exclude those, since git repositories can't contain .git folders for obvious reason. I have a rule that ignores any .git folder, anywhere and always. Still on a merge there are empty folder (re-created with a .gitignore despite the fact that they should be ignored. Typically, in trivial repositories, .git\objects\info and .git\refs\tags might well be empty. And those promptly get recreated despite the rest of the .git contents being correctly ignored.

The ignore rule looks as follows (maybe slightly overcomplicated, but hey it works). It obviously occurs before any rule that assigns a path to a repository/branch and as previously stated the path is otherwise ignored correctly with .gitignore files for empty-dirs being the only exception.

match /([^/]+/)+\.git/
    action ignore
end match

I tried to find and fix the occurrence in the source, but couldn't quickly and reliably identify the point in svn.cpp where this decision is made (or how to respect filters that may exist).

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

No branches or pull requests

1 participant