Code

sha1_name.c: no need to include diff.h; tree-walk.h will do.
[git.git] / git-reset.sh
index 6c9e58ad9a727ab5091b0de02e089b82cb8331dd..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
@@ -100,4 +103,4 @@ case "$reset_type" in
        ;;
 esac
 
-rm -f "$GIT_DIR/MERGE_HEAD"
+rm -f "$GIT_DIR/MERGE_HEAD" "$GIT_DIR/rr-cache/MERGE_RR"