[Libreoffice-commits] .: Branch 'libreoffice-3-5' - bin/git-new-workdir

Christian Lohmaier cloph at kemper.freedesktop.org
Fri Dec 16 03:51:19 PST 2011


 bin/git-new-workdir |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit d1ac28dfbb741f1771262bf5e19888cb996f2fcd
Author: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
Date:   Fri Dec 16 12:43:06 2011 +0100

    when creating linked clone with branch, make sure to ff to the current state
    
    the git-new-workdir helper is mostly useful to have one pristine clone
    where the updates get pulled into & from that you create working copies.
    As pulling to that master copy only updates the current branch (usually
    master), checking out a different branch using git-new-workdir will
    result in "your branch is behind the remote branch by xx commits" when
    there have been commits after the branch was first checked out locally.
    
    Thus this change adds a fast-forwarding merge when a branch is given.

diff --git a/bin/git-new-workdir b/bin/git-new-workdir
index 3ad2c0c..137ea08 100755
--- a/bin/git-new-workdir
+++ b/bin/git-new-workdir
@@ -80,3 +80,7 @@ cp "$git_dir/HEAD" .git/HEAD
 # checkout the branch (either the same as HEAD from the original repository, or
 # the one that was asked for)
 git checkout -f $branch
+if test -n "$branch"
+then
+	git merge --ff-only '@{upstream}'
+fi


More information about the Libreoffice-commits mailing list