From ad06535c8d2bb3fda4fe885b523b2c2b9b56c4f8 Mon Sep 17 00:00:00 2001 From: Jephte CLAIN Date: Mon, 15 Feb 2016 21:09:30 +0400 Subject: [PATCH] =?UTF-8?q?pu:=20autoriser=20fast-forward=20m=C3=AAme=20en?= =?UTF-8?q?=20cas=20de=20modifications=20locales?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/ulib/vcs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) 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