mirror of
https://github.com/git/git
synced 2024-08-27 11:39:22 +00:00
Update "git-pull-script" to use "read-tree -m" for
reading a single tree too. That should speed up a trivial merge noticeably. Also, don't bother reading back the tree we just wrote when we committed a real merge. It had better be the same one we still have..
This commit is contained in:
parent
a3a65234db
commit
8ccfbf3279
|
@ -35,7 +35,7 @@ if [ "$common" == "$head" ]; then
|
||||||
echo "Destroying all noncommitted data!"
|
echo "Destroying all noncommitted data!"
|
||||||
echo "Kill me within 3 seconds.."
|
echo "Kill me within 3 seconds.."
|
||||||
sleep 3
|
sleep 3
|
||||||
read-tree $merge_tree && checkout-cache -f -a && update-cache --refresh
|
read-tree -m $merge_tree && checkout-cache -f -a && update-cache --refresh
|
||||||
echo $merge_head > .git/HEAD
|
echo $merge_head > .git/HEAD
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
@ -45,4 +45,4 @@ result_tree=$(write-tree) || exit 1
|
||||||
result_commit=$(echo "Merge $merge_repo" | commit-tree $result_tree -p $head -p $merge_head)
|
result_commit=$(echo "Merge $merge_repo" | commit-tree $result_tree -p $head -p $merge_head)
|
||||||
echo "Committed merge $result_commit"
|
echo "Committed merge $result_commit"
|
||||||
echo $result_commit > .git/HEAD
|
echo $result_commit > .git/HEAD
|
||||||
read-tree $result_tree && checkout-cache -f -a && update-cache --refresh
|
checkout-cache -f -a && update-cache --refresh
|
||||||
|
|
Loading…
Reference in a new issue