diff --git a/git-merge-recursive.py b/git-merge-recursive.py index d7d36aa7d1..37258ad774 100755 --- a/git-merge-recursive.py +++ b/git-merge-recursive.py @@ -293,6 +293,10 @@ def removeFile(clean, path): except OSError, e: if e.errno != errno.ENOENT and e.errno != errno.EISDIR: raise + try: + os.removedirs(os.path.dirname(path)) + except: + pass def uniquePath(path, branch): def fileExists(path):