aboutsummaryrefslogtreecommitdiffstats
path: root/git-reset.sh
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-09-27 18:14:27 -0700
committerJunio C Hamano <junkio@cox.net>2005-09-28 16:42:44 -0700
commitbf7960eb51a26bcf52f27a60bfcf005661266b1e (patch)
treebaeef0ee852f787668eceadd7aefa29b79add7a7 /git-reset.sh
parenta7928f8ec7fb3c368e6086ab48f41e33a22e1b94 (diff)
downloadgit-bf7960eb51a26bcf52f27a60bfcf005661266b1e.tar.gz
Use git-update-ref in scripts.
This uses the git-update-ref command in scripts for safer updates. Also places where we used to read HEAD ref by using "cat" were fixed to use git-rev-parse. This will matter when we start using symbolic references. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-reset.sh')
-rwxr-xr-xgit-reset.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-reset.sh b/git-reset.sh
index dfa9cb8bb1..f9995cadf5 100755
--- a/git-reset.sh
+++ b/git-reset.sh
@@ -60,7 +60,7 @@ then
else
rm -f "$GIT_DIR/ORIG_HEAD"
fi
-echo "$rev" >"$GIT_DIR/HEAD"
+git-update-ref HEAD "$rev"
case "$reset_type" in
--hard )