Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed a problem with redirection of stdout/stderr. The specifier '2>&1'

should come *after* the redirection of stdout to /dev/null. For an
explanation and a simple demonstration of the differences, see:

	http://is.gd/8srJR
  • Loading branch information...
commit 283b0f708daaf8ccbc7cbb82bff61fbc78a606f7 1 parent f46e290
@nvie authored
Showing with 5 additions and 5 deletions.
  1. +1 −1  git-flow
  2. +4 −4 git-flow-init
View
2  git-flow
@@ -77,7 +77,7 @@ main() {
if [ "$1" != "" ] && ! echo "$1" | grep -q "^-"; then
SUBACTION="$1"; shift
fi
- if ! type "cmd_$SUBACTION" > /dev/null 2>&1; then
+ if ! type "cmd_$SUBACTION" >/dev/null 2>&1; then
warn "Unknown subcommand: '$SUBACTION'"
usage
exit 1
View
8 git-flow-init
@@ -21,12 +21,12 @@ cmd_default() {
echo
echo "Summary of actions:"
- if ! git rev-parse --git-dir 2>&1 >/dev/null; then
+ if ! git rev-parse --git-dir >/dev/null 2>&1; then
git init --quiet
echo "- A new git repository at $PWD was created"
fi
- if ! git rev-parse --quiet --verify HEAD 2>&1 >/dev/null; then
+ if ! git rev-parse --quiet --verify HEAD >/dev/null 2>&1; then
touch "$README"
git add "$README"
git commit --quiet -m "initial commit"
@@ -36,7 +36,7 @@ cmd_default() {
echo "- An initial commit was created at branch '$MASTER_BRANCH'"
fi
- if ! git rev-parse --verify "$MASTER_BRANCH" 2>&1 >/dev/null; then
+ if ! git rev-parse --verify "$MASTER_BRANCH" >/dev/null 2>&1; then
die "Cannot find your master branch. Try: git branch -m <mymaster> $MASTER_BRANCH"
fi
@@ -47,7 +47,7 @@ cmd_default() {
gitflow_require_branches_equal "$MASTER_BRANCH" "$ORIGIN/$MASTER_BRANCH"
fi
- if git rev-parse --verify "$DEVELOP_BRANCH" 2>&1 >/dev/null; then
+ if git rev-parse --verify "$DEVELOP_BRANCH" >/dev/null 2>&1; then
gitflow_require_branches_equal "$DEVELOP_BRANCH" "$ORIGIN/$DEVELOP_BRANCH"
else
git checkout -q -b "$DEVELOP_BRANCH" "$MASTER_BRANCH"
Please sign in to comment.
Something went wrong with that request. Please try again.