git-reset-scripton commit [PATCH] Fix test failure due to overly strict .git directory tests (a579def)
   1#!/bin/sh
   2. git-sh-setup-script || die "Not a git archive"
   3rev=$(git-rev-parse --verify --default HEAD "$@") || exit
   4rev=$(git-rev-parse --verify $rev^0) || exit
   5git-read-tree --reset "$rev" && {
   6        if orig=$(git-rev-parse --verify HEAD 2>/dev/null)
   7        then
   8                echo "$orig" >"$GIT_DIR/ORIG_HEAD"
   9        fi
  10        echo "$rev" > "$GIT_DIR/HEAD"
  11}
  12git-update-cache --refresh
  13rm -f "$GIT_DIR/MERGE_HEAD"