2016-11-18 01:21:52 +00:00
|
|
|
#!/usr/bin/env sh
|
2017-09-28 07:58:08 +00:00
|
|
|
git checkout carbon
|
2016-11-18 01:21:52 +00:00
|
|
|
|
|
|
|
if test -n "$(git status --porcelain)"; then
|
|
|
|
echo 'Unclean working tree. Commit or stash changes first.' >&2;
|
|
|
|
exit 128;
|
|
|
|
fi
|
|
|
|
|
|
|
|
if ! git fetch --quiet 2>/dev/null; then
|
|
|
|
echo 'There was a problem fetching your branch. Run `git fetch` to see more...' >&2;
|
|
|
|
exit 128;
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "0" != "$(git rev-list --count --left-only @'{u}'...HEAD)"; then
|
|
|
|
echo 'Remote history differ. Please pull changes.' >&2;
|
|
|
|
exit 128;
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo 'No conflicts.' >&2;
|