diff --git a/lib/ulib/vcs b/lib/ulib/vcs index 2eb9fe6..536dadd 100644 --- a/lib/ulib/vcs +++ b/lib/ulib/vcs @@ -466,16 +466,10 @@ function git_update() { remote="$(git_get_branch_remote "$branch")" rbranch="$(git_get_branch_rbranch "$branch" "$remote")" pbranch="${rbranch#refs/remotes/}" - if [ -z "$remote" -o -z "$rbranch" ]; then - echo "Note: there are uncommitted local changes" - return 0 - elif git_is_ancestor "$branch" "$rbranch"; then - echo "* Uncommitted changes, unwilling to fast-forward local branch $branch from $pbranch" - else - echo "* Cannot fast-forward local branch $branch from $pbranch" - echo " (and there are uncommitted local changes)" + if git merge -q --ff-only "$rbranch"; then + echo "* There are uncommitted local changes. Only current branch were updated" + echo " (CURRENT branch $branch were fast-forwarded from $pbranch)" fi - echo "Try to merge manually with: git merge $pbranch" return 0 fi