diff options
Diffstat (limited to 'git-reset.sh')
-rwxr-xr-x | git-reset.sh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/git-reset.sh b/git-reset.sh index fe53fc8065..6cb073cb16 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 |