Last active
May 18, 2016 07:39
-
-
Save raszi/6d1a7700d7612c7e6d2b81cbce806e81 to your computer and use it in GitHub Desktop.
Test script for git-fresh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
TEST_DIR=$(mktemp -d) | |
pushd ${TEST_DIR} | |
git init && touch test && git add test && git commit -am 'Initial commit' | |
git checkout -b something && git checkout master && git-fresh && git checkout - | |
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD) | |
popd | |
rm -rf ${TEST_DIR} | |
[ ${CURRENT_BRANCH} == "master" ] && exit 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment