combined-diff: use diffcore before intersecting paths.
[git.git] / git-reset.sh
index f9995ca..fe53fc8 100755 (executable)
@@ -1,7 +1,9 @@
 #!/bin/sh
-. git-sh-setup || die "Not a git archive"
 
-tmp=/var/tmp/reset.$$
+USAGE='[--mixed | --soft | --hard]  [<commit-ish>]'
+. git-sh-setup
+
+tmp=${GIT_DIR}/reset.$$
 trap 'rm -f $tmp-*' 0 1 2 3 15
 
 reset_type=--mixed
@@ -10,6 +12,8 @@ case "$1" in
        reset_type="$1"
        shift
        ;;
+-*)
+        usage ;;
 esac
 
 rev=$(git-rev-parse --verify --default HEAD "$@") || exit
@@ -96,4 +100,4 @@ case "$reset_type" in
        ;;
 esac
 
-rm -f "$GIT_DIR/MERGE_HEAD"
+rm -f "$GIT_DIR/MERGE_HEAD" "$GIT_DIR/rr-cache/MERGE_RR"