X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;ds=sidebyside;f=git-resolve-script;h=4641119e0f00848f5dacce40fd376efc1cbdbcb5;hb=35cc4bcd10862db190df9685b7ad221f2a25404f;hp=bf2fb2d431da4702cd2b5fe3f414ce22c7ab284d;hpb=6b38a402e97274037982a5346ca4168cc8ee026c;p=git.git diff --git a/git-resolve-script b/git-resolve-script index bf2fb2d4..4641119e 100755 --- a/git-resolve-script +++ b/git-resolve-script @@ -4,12 +4,11 @@ # # Resolve two trees. # -head=$(git-rev-parse --revs-only "$1") -merge=$(git-rev-parse --revs-only "$2") -merge_repo="$3" +. git-sh-setup-script || die "Not a git archive" -: ${GIT_DIR=.git} -: ${GIT_OBJECT_DIRECTORY="${SHA1_FILE_DIRECTORY-"$GIT_DIR/objects"}"} +head=$(git-rev-parse --verify "$1"^0) || exit +merge=$(git-rev-parse --verify "$2"^0) || exit +merge_msg="$3" dropheads() { rm -f -- "$GIT_DIR/MERGE_HEAD" \ @@ -20,9 +19,8 @@ dropheads() { # The remote name is just used for the message, # but we do want it. # -if [ -z "$head" -o -z "$merge" -o -z "$merge_repo" ]; then - echo "git-resolve-script