summaryrefslogtreecommitdiff
path: root/git-checkout.sh
diff options
context:
space:
mode:
Diffstat (limited to 'git-checkout.sh')
-rwxr-xr-xgit-checkout.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/git-checkout.sh b/git-checkout.sh
index 66e40b90eb..e02d4d87f6 100755
--- a/git-checkout.sh
+++ b/git-checkout.sh
@@ -201,8 +201,9 @@ else
git diff-files --name-only | git update-index --remove --stdin &&
work=`git write-tree` &&
git read-tree --reset -u $new &&
- git read-tree -m -u --aggressive --exclude-per-directory=.gitignore $old $new $work ||
- exit
+ eval GITHEAD_$new=${new_name:-${branch:-$new}} GITHEAD_$work=local &&
+ export GITHEAD_$new GITHEAD_$work &&
+ git merge-recursive $old -- $new $work || exit
if result=`git write-tree 2>/dev/null`
then