projects
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
397c766
)
merge-recursive::removeFile: remove empty directories
author
Junio C Hamano
<junkio@cox.net>
Sun, 20 Nov 2005 03:50:44 +0000
(19:50 -0800)
committer
Junio C Hamano
<junkio@cox.net>
Sun, 20 Nov 2005 03:57:54 +0000
(19:57 -0800)
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>
git-merge-recursive.py
patch
|
blob
|
history
diff --git
a/git-merge-recursive.py
b/git-merge-recursive.py
index
d7d36aa
..
37258ad
100755
(executable)
--- 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):