Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
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
raw
|
patch
| inline |
side by side
(parent:
397c766
)
diff --git
a/git-merge-recursive.py
b/git-merge-recursive.py
index d7d36aa7d11299d3a1e91dce1bc9572ac56a7c08..37258ad77481fb0edaf2b084b7be173d8da8c586 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):