blob: ad89ae37a1941572fca3a19e85ff8173608f8f80 (
plain) (
tree)
|
|
#!/bin/sh
set -eu
STR="$(cat)"
URL="$(echo "$STR" | sed -n -e '/^are available in the Git repository at:/,+2 {
s/[[:space:]]\+//
s/\(=[[:digit:]]\{2\}\)\+$//
/^\(http\|git\)/p
}')"
END="$(echo "$STR" | awk '/^for you to fetch changes up to / { print $NF }' | sed -e 's/[=:]*$//')"
git fetch "$URL" "$END"
git checkout -B _4review FETCH_HEAD
|