diff options
author | Junio C Hamano <junkio@cox.net> | 2005-11-19 19:50:44 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2005-11-19 19:57:54 -0800 |
commit | 80e21a9ed809d98788ff6fb705d911bee37d460b (patch) | |
tree | 84f96810780b5489e96405ba9f0975330676f773 /git-merge-recursive.py | |
parent | 397c76697f898e0341699fba8ef783f3342329c7 (diff) | |
download | git-80e21a9ed809d98788ff6fb705d911bee37d460b.tar.gz |
merge-recursive::removeFile: remove empty directories
When the last file in a directory is removed as the result of a
merge, try to rmdir the now-empty directory.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-merge-recursive.py')
-rwxr-xr-x | git-merge-recursive.py | 4 |
1 files changed, 4 insertions, 0 deletions
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): |