3 # (Extracted from git-pull.sh; thanks to Junio C Hamano for the direction.)
5 # Prints out the fetched heads intended for being merged
6 # (which are stored in FETCH_HEAD).
8 # This script makes inspecting the potential merge and
9 # then manually doing it each a simpler command:
11 # git log $(git heads-for-merge) --not HEAD
12 # git merge $(git heads-for-merge)
14 # Or for commits without a common ancestor:
16 # for h in $(git heads-for-merge); do git merge "$h"; done
18 # This sequence of commands is an analog of "Fun with FETCH_HEAD"
19 # (http://) for the case of many fetched heads.
24 sed -e '/ not-for-merge /d' \
25 -e 's/ .*//' "$GIT_DIR"/FETCH_HEAD | \