X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;ds=sidebyside;f=git-resolve-script;h=000cbb85e3ffd4be739ce0791d1afa59832aa734;hb=452ce291a99131768e2d61d2dcf8a4a1b78d39a3;hp=7c0e3d8aa8f7e63d1e98b79612844043a8481011;hpb=10d781b9caa4f71495c7b34963bef137216f86a8;p=git.git diff --git a/git-resolve-script b/git-resolve-script index 7c0e3d8a..000cbb85 100755 --- a/git-resolve-script +++ b/git-resolve-script @@ -36,19 +36,21 @@ if [ -z "$common" ]; then die "Unable to find common commit between" $merge $head fi -if [ "$common" == "$merge" ]; then +case "$common" in +"$merge") echo "Already up-to-date. Yeeah!" dropheads exit 0 -fi -if [ "$common" == "$head" ]; then + ;; +"$head") echo "Updating from $head to $merge." git-read-tree -u -m $head $merge || exit 1 echo $merge > "$GIT_DIR"/HEAD git-diff-tree -p $head $merge | git-apply --stat dropheads exit 0 -fi + ;; +esac # Find an optimum merge base if there are more than one candidates. LF='