diff options
author | Junio C Hamano <junkio@cox.net> | 2005-09-28 03:14:27 +0200 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2005-09-29 01:42:44 +0200 |
commit | bf7960eb51a26bcf52f27a60bfcf005661266b1e (patch) | |
tree | baeef0ee852f787668eceadd7aefa29b79add7a7 /git-resolve.sh | |
parent | [PATCH] Make some needlessly global stuff static (diff) | |
download | git-bf7960eb51a26bcf52f27a60bfcf005661266b1e.tar.xz git-bf7960eb51a26bcf52f27a60bfcf005661266b1e.zip |
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-resolve.sh')
-rwxr-xr-x | git-resolve.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/git-resolve.sh b/git-resolve.sh index 1f559d8cb9..7d8fb54f95 100755 --- a/git-resolve.sh +++ b/git-resolve.sh @@ -45,7 +45,7 @@ case "$common" in "$head") echo "Updating from $head to $merge." git-read-tree -u -m $head $merge || exit 1 - echo $merge > "$GIT_DIR"/HEAD + git-update-ref HEAD "$merge" "$head" git-diff-tree -p $head $merge | git-apply --stat dropheads exit 0 @@ -99,6 +99,6 @@ if [ $? -ne 0 ]; then fi result_commit=$(echo "$merge_msg" | git-commit-tree $result_tree -p $head -p $merge) echo "Committed merge $result_commit" -echo $result_commit > "$GIT_DIR"/HEAD +git-update-ref HEAD "$result_commit" "$head" git-diff-tree -p $head $result_commit | git-apply --stat dropheads |