Merge branch 'fix'
[gitweb.git] / git-reset.sh
index fe53fc8065dc82c0054ba9891b28a00b0752bf87..6cb073cb16f8b8d8b923bd0cd77be00da0e169e3 100755 (executable)
@@ -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