X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=git-resolve-script;h=000cbb85e3ffd4be739ce0791d1afa59832aa734;hb=78938b0d8a95b09d94af214fdb6b5f053a5edb98;hp=7c0e3d8aa8f7e63d1e98b79612844043a8481011;hpb=51017101c7a308745ba3c04944457f1dc6a55780;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='