|
|
@ -3,7 +3,7 @@ |
|
|
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
|
|
|
# |
|
|
|
# Filename: bin/sde-update-tree |
|
|
|
# Copyright (C) 2007 - 2009 The OpenSDE Project |
|
|
|
# Copyright (C) 2007 - 2013 The OpenSDE Project |
|
|
|
# |
|
|
|
# More information can be found in the files COPYING and README. |
|
|
|
# |
|
|
@ -63,6 +63,7 @@ update_git() |
|
|
|
local remote="$(git config branch.$branch.remote)" |
|
|
|
local remote_list="$(git remote)" |
|
|
|
local remote_branch= remote_branch_list= |
|
|
|
local changes=false |
|
|
|
|
|
|
|
if [ -z "$remote_list" ]; then |
|
|
|
echo_warning "$prefix: no remotes set" |
|
|
@ -97,9 +98,17 @@ update_git() |
|
|
|
echo_info "$prefix:" |
|
|
|
fi |
|
|
|
|
|
|
|
if git reset; then |
|
|
|
if git reset -q; then |
|
|
|
git remote prune "$remote" |
|
|
|
if [ -n "$(git ls-files -md)" ]; then |
|
|
|
changes=true |
|
|
|
git stash > /dev/null |
|
|
|
fi |
|
|
|
git pull --rebase |
|
|
|
if $changes; then |
|
|
|
git stash pop > /dev/null |
|
|
|
git status --porcelain |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
if [ -x "./update.sh" ]; then |
|
|
|