summaryrefslogtreecommitdiff
path: root/git-reset.sh
diff options
context:
space:
mode:
Diffstat (limited to 'git-reset.sh')
-rwxr-xr-xgit-reset.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/git-reset.sh b/git-reset.sh
index fe53fc8..6cb073c 100755
--- a/git-reset.sh
+++ b/git-reset.sh
@@ -88,6 +88,9 @@ case "$reset_type" in
# it is ok if this fails -- it may already
# have been culled by checkout-index.
unlink $_;
+ while (s|/[^/]*$||) {
+ rmdir($_) or last;
+ }
}
}
' $tmp-exists