Skip to content

Commit

Permalink
restore &> behaviour but with posix compliant shell syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
hollow authored and nvie committed Jan 27, 2010
1 parent b22a076 commit 74a4fe2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions git-flow
Expand Up @@ -90,12 +90,12 @@ gitflow_init() {
echo
echo "Summary of actions:"

if ! git rev-parse --git-dir >/dev/null; then
if ! git rev-parse --git-dir 2>&1 >/dev/null; then
git init --quiet
echo "- A new git repository at $PWD was created"
fi

if ! git rev-parse --quiet --verify HEAD >/dev/null; then
if ! git rev-parse --quiet --verify HEAD 2>&1 >/dev/null; then
touch $README
git add $README
git commit --quiet -m "initial commit"
Expand All @@ -105,7 +105,7 @@ gitflow_init() {
echo "- An initial commit was created at branch '$MASTER_BRANCH'"
fi

if ! git rev-parse --verify $MASTER_BRANCH >/dev/null; then
if ! git rev-parse --verify $MASTER_BRANCH 2>&1 >/dev/null; then
die "Cannot find your master branch. Try: git branch -m <mymaster> $MASTER_BRANCH"
fi

Expand All @@ -116,7 +116,7 @@ gitflow_init() {
gitflow_require_branches_equal $MASTER_BRANCH $ORIGIN/$MASTER_BRANCH
fi

if git rev-parse --verify $DEVELOP_BRANCH >/dev/null; then
if git rev-parse --verify $DEVELOP_BRANCH 2>&1 >/dev/null; then
gitflow_require_branches_equal $DEVELOP_BRANCH $ORIGIN/$DEVELOP_BRANCH
else
git checkout -q -b $DEVELOP_BRANCH $MASTER_BRANCH
Expand Down

0 comments on commit 74a4fe2

Please sign in to comment.