Fix git-llvm to not delete non-empty directories.
Previously, if a directory contained only other sub-directories, one of which was being removed, git llvm would delete the parent and all its subdirs, even though only one should've been deleted. This error occurred in r366590, where the commit attempted to remove lldb/packages/Python/lldbsuite/test/tools/lldb-mi, but git-llvm erroneously removed the entire contents of lldb/packages/Python/lldbsuite/test/tools. This happened because "git apply" automatically removes empty directories locally, and the absence of a local directory was previously taken as an indication to call 'svn rm' on that directory. However, an empty local directory does not necessarily indicate that the directory is truly empty. Fix that by removing directories only when they're empty on the git side. Differential Revision: https://reviews.llvm.org/D65416 llvm-svn: 367693
Loading
Please sign in to comment