projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'lt/fix-sol-pack'
[git.git]
/
git-reset.sh
diff --git
a/git-reset.sh
b/git-reset.sh
index
72ef303
..
6cb073c
100755
(executable)
--- a/
git-reset.sh
+++ b/
git-reset.sh
@@
-1,11
+1,9
@@
#!/bin/sh
#!/bin/sh
-. git-sh-setup
-usage () {
- die 'Usage: git reset [--mixed | --soft | --hard] [<commit-ish>]'
-}
+USAGE='[--mixed | --soft | --hard] [<commit-ish>]'
+. git-sh-setup
-tmp=
/var/tmp
/reset.$$
+tmp=
${GIT_DIR}
/reset.$$
trap 'rm -f $tmp-*' 0 1 2 3 15
reset_type=--mixed
trap 'rm -f $tmp-*' 0 1 2 3 15
reset_type=--mixed
@@
-90,6
+88,9
@@
case "$reset_type" in
# it is ok if this fails -- it may already
# have been culled by checkout-index.
unlink $_;
# it is ok if this fails -- it may already
# have been culled by checkout-index.
unlink $_;
+ while (s|/[^/]*$||) {
+ rmdir($_) or last;
+ }
}
}
' $tmp-exists
}
}
' $tmp-exists
@@
-102,4
+103,4
@@
case "$reset_type" in
;;
esac
;;
esac
-rm -f "$GIT_DIR/MERGE_HEAD"
+rm -f "$GIT_DIR/MERGE_HEAD"
"$GIT_DIR/rr-cache/MERGE_RR"