Commit 7c03411a authored by Peter van der Does's avatar Peter van der Does Committed by Vincent Driessen

Remove trailing whitespace

Signed-off-by: 's avatarPeter van der Does <peter@avirtualhome.com>
Signed-off-by: 's avatarVincent Driessen <vincent@3rdcloud.com>
parent c2fe6c70
...@@ -10,17 +10,17 @@ ...@@ -10,17 +10,17 @@
# http://github.com/nvie/gitflow # http://github.com/nvie/gitflow
# #
# Copyright 2010 Vincent Driessen. All rights reserved. # Copyright 2010 Vincent Driessen. All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met: # modification, are permitted provided that the following conditions are met:
# #
# 1. Redistributions of source code must retain the above copyright notice, # 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer. # this list of conditions and the following disclaimer.
# #
# 2. Redistributions in binary form must reproduce the above copyright # 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the # notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution. # documentation and/or other materials provided with the distribution.
# #
# THIS SOFTWARE IS PROVIDED BY VINCENT DRIESSEN ``AS IS'' AND ANY EXPRESS OR # THIS SOFTWARE IS PROVIDED BY VINCENT DRIESSEN ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# #
# The views and conclusions contained in the software and documentation are # The views and conclusions contained in the software and documentation are
# those of the authors and should not be interpreted as representing official # those of the authors and should not be interpreted as representing official
# policies, either expressed or implied, of Vincent Driessen. # policies, either expressed or implied, of Vincent Driessen.
...@@ -107,13 +107,13 @@ main() { ...@@ -107,13 +107,13 @@ main() {
# Run hook action # Run hook action
do_hook pre do_hook pre
# run the specified action # run the specified action
cmd_$SUBACTION "$@" cmd_$SUBACTION "$@"
# Run hook action # Run hook action
do_hook post do_hook post
} }
main "$@" main "$@"
...@@ -9,17 +9,17 @@ ...@@ -9,17 +9,17 @@
# http://github.com/nvie/gitflow # http://github.com/nvie/gitflow
# #
# Copyright 2010 Vincent Driessen. All rights reserved. # Copyright 2010 Vincent Driessen. All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met: # modification, are permitted provided that the following conditions are met:
# #
# 1. Redistributions of source code must retain the above copyright notice, # 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer. # this list of conditions and the following disclaimer.
# #
# 2. Redistributions in binary form must reproduce the above copyright # 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the # notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution. # documentation and/or other materials provided with the distribution.
# #
# THIS SOFTWARE IS PROVIDED BY VINCENT DRIESSEN ``AS IS'' AND ANY EXPRESS OR # THIS SOFTWARE IS PROVIDED BY VINCENT DRIESSEN ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# #
# The views and conclusions contained in the software and documentation are # The views and conclusions contained in the software and documentation are
# those of the authors and should not be interpreted as representing official # those of the authors and should not be interpreted as representing official
# policies, either expressed or implied, of Vincent Driessen. # policies, either expressed or implied, of Vincent Driessen.
...@@ -244,7 +244,7 @@ cmd_finish() { ...@@ -244,7 +244,7 @@ cmd_finish() {
# TODO: detect that we're working on the correct branch here! # TODO: detect that we're working on the correct branch here!
# The user need not necessarily have given the same $NAME twice here # The user need not necessarily have given the same $NAME twice here
# (although he/she should). # (although he/she should).
# #
# TODO: git_is_clean_working_tree() should provide an alternative # TODO: git_is_clean_working_tree() should provide an alternative
# exit code for "unmerged changes in working tree", which we should # exit code for "unmerged changes in working tree", which we should
...@@ -270,7 +270,7 @@ cmd_finish() { ...@@ -270,7 +270,7 @@ cmd_finish() {
echo "Merge conflicts not resolved yet, use:" echo "Merge conflicts not resolved yet, use:"
echo " git mergetool" echo " git mergetool"
echo " git commit" echo " git commit"
echo echo
echo "You can then complete the finish by running it again:" echo "You can then complete the finish by running it again:"
echo " git flow feature finish $NAME" echo " git flow feature finish $NAME"
echo echo
...@@ -324,7 +324,7 @@ cmd_finish() { ...@@ -324,7 +324,7 @@ cmd_finish() {
echo "There were merge conflicts. To resolve the merge conflict manually, use:" echo "There were merge conflicts. To resolve the merge conflict manually, use:"
echo " git mergetool" echo " git mergetool"
echo " git commit" echo " git commit"
echo echo
echo "You can then complete the finish by running it again:" echo "You can then complete the finish by running it again:"
echo " git flow feature finish $NAME" echo " git flow feature finish $NAME"
echo echo
...@@ -344,8 +344,8 @@ helper_finish_cleanup() { ...@@ -344,8 +344,8 @@ helper_finish_cleanup() {
if flag fetch; then if flag fetch; then
git push "$ORIGIN" ":refs/heads/$BRANCH" git push "$ORIGIN" ":refs/heads/$BRANCH"
fi fi
if noflag keep; then if noflag keep; then
if flag force_delete; then if flag force_delete; then
git branch -D "$BRANCH" git branch -D "$BRANCH"
......
...@@ -9,17 +9,17 @@ ...@@ -9,17 +9,17 @@
# http://github.com/nvie/gitflow # http://github.com/nvie/gitflow
# #
# Copyright 2010 Vincent Driessen. All rights reserved. # Copyright 2010 Vincent Driessen. All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met: # modification, are permitted provided that the following conditions are met:
# #
# 1. Redistributions of source code must retain the above copyright notice, # 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer. # this list of conditions and the following disclaimer.
# #
# 2. Redistributions in binary form must reproduce the above copyright # 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the # notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution. # documentation and/or other materials provided with the distribution.
# #
# THIS SOFTWARE IS PROVIDED BY VINCENT DRIESSEN ``AS IS'' AND ANY EXPRESS OR # THIS SOFTWARE IS PROVIDED BY VINCENT DRIESSEN ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# #
# The views and conclusions contained in the software and documentation are # The views and conclusions contained in the software and documentation are
# those of the authors and should not be interpreted as representing official # those of the authors and should not be interpreted as representing official
# policies, either expressed or implied, of Vincent Driessen. # policies, either expressed or implied, of Vincent Driessen.
......
...@@ -9,17 +9,17 @@ ...@@ -9,17 +9,17 @@
# http://github.com/nvie/gitflow # http://github.com/nvie/gitflow
# #
# Copyright 2010 Vincent Driessen. All rights reserved. # Copyright 2010 Vincent Driessen. All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met: # modification, are permitted provided that the following conditions are met:
# #
# 1. Redistributions of source code must retain the above copyright notice, # 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer. # this list of conditions and the following disclaimer.
# #
# 2. Redistributions in binary form must reproduce the above copyright # 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the # notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution. # documentation and/or other materials provided with the distribution.
# #
# THIS SOFTWARE IS PROVIDED BY VINCENT DRIESSEN ``AS IS'' AND ANY EXPRESS OR # THIS SOFTWARE IS PROVIDED BY VINCENT DRIESSEN ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# #
# The views and conclusions contained in the software and documentation are # The views and conclusions contained in the software and documentation are
# those of the authors and should not be interpreted as representing official # those of the authors and should not be interpreted as representing official
# policies, either expressed or implied, of Vincent Driessen. # policies, either expressed or implied, of Vincent Driessen.
...@@ -51,7 +51,7 @@ cmd_default() { ...@@ -51,7 +51,7 @@ cmd_default() {
DEFINE_boolean force false 'force setting of gitflow branches, even if already configured' f DEFINE_boolean force false 'force setting of gitflow branches, even if already configured' f
DEFINE_boolean defaults false 'use default branch naming conventions' d DEFINE_boolean defaults false 'use default branch naming conventions' d
parse_args "$@" parse_args "$@"
if ! git rev-parse --git-dir >/dev/null 2>&1; then if ! git rev-parse --git-dir >/dev/null 2>&1; then
git init git init
else else
...@@ -106,7 +106,7 @@ cmd_default() { ...@@ -106,7 +106,7 @@ cmd_default() {
fi fi
done done
fi fi
printf "Branch name for production releases: [$default_suggestion] " printf "Branch name for production releases: [$default_suggestion] "
if noflag defaults; then if noflag defaults; then
read answer read answer
...@@ -224,10 +224,10 @@ cmd_default() { ...@@ -224,10 +224,10 @@ cmd_default() {
# Ask the user for naming conventions (branch and tag prefixes ) # Ask the user for naming conventions (branch and tag prefixes )
if flag force || \ if flag force || \
! git config --get gitflow.prefix.feature >/dev/null 2>&1 || ! git config --get gitflow.prefix.feature >/dev/null 2>&1 ||
! git config --get gitflow.prefix.release >/dev/null 2>&1 || ! git config --get gitflow.prefix.release >/dev/null 2>&1 ||
! git config --get gitflow.prefix.hotfix >/dev/null 2>&1 || ! git config --get gitflow.prefix.hotfix >/dev/null 2>&1 ||
! git config --get gitflow.prefix.support >/dev/null 2>&1 || ! git config --get gitflow.prefix.support >/dev/null 2>&1 ||
! git config --get gitflow.prefix.versiontag >/dev/null 2>&1; then ! git config --get gitflow.prefix.versiontag >/dev/null 2>&1; then
echo echo
echo "How to name your supporting branch prefixes?" echo "How to name your supporting branch prefixes?"
......
...@@ -9,17 +9,17 @@ ...@@ -9,17 +9,17 @@
# http://github.com/nvie/gitflow # http://github.com/nvie/gitflow
# #
# Copyright 2010 Vincent Driessen. All rights reserved. # Copyright 2010 Vincent Driessen. All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met: # modification, are permitted provided that the following conditions are met:
# #
# 1. Redistributions of source code must retain the above copyright notice, # 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer. # this list of conditions and the following disclaimer.
# #
# 2. Redistributions in binary form must reproduce the above copyright # 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the # notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution. # documentation and/or other materials provided with the distribution.
# #
# THIS SOFTWARE IS PROVIDED BY VINCENT DRIESSEN ``AS IS'' AND ANY EXPRESS OR # THIS SOFTWARE IS PROVIDED BY VINCENT DRIESSEN ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# #
# The views and conclusions contained in the software and documentation are # The views and conclusions contained in the software and documentation are
# those of the authors and should not be interpreted as representing official # those of the authors and should not be interpreted as representing official
# policies, either expressed or implied, of Vincent Driessen. # policies, either expressed or implied, of Vincent Driessen.
......
...@@ -9,17 +9,17 @@ ...@@ -9,17 +9,17 @@
# http://github.com/nvie/gitflow # http://github.com/nvie/gitflow
# #
# Copyright 2010 Vincent Driessen. All rights reserved. # Copyright 2010 Vincent Driessen. All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met: # modification, are permitted provided that the following conditions are met:
# #
# 1. Redistributions of source code must retain the above copyright notice, # 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer. # this list of conditions and the following disclaimer.
# #
# 2. Redistributions in binary form must reproduce the above copyright # 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the # notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution. # documentation and/or other materials provided with the distribution.
# #
# THIS SOFTWARE IS PROVIDED BY VINCENT DRIESSEN ``AS IS'' AND ANY EXPRESS OR # THIS SOFTWARE IS PROVIDED BY VINCENT DRIESSEN ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# #
# The views and conclusions contained in the software and documentation are # The views and conclusions contained in the software and documentation are
# those of the authors and should not be interpreted as representing official # those of the authors and should not be interpreted as representing official
# policies, either expressed or implied, of Vincent Driessen. # policies, either expressed or implied, of Vincent Driessen.
......
...@@ -9,17 +9,17 @@ ...@@ -9,17 +9,17 @@
# http://github.com/nvie/gitflow # http://github.com/nvie/gitflow
# #
# Copyright 2010 Vincent Driessen. All rights reserved. # Copyright 2010 Vincent Driessen. All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met: # modification, are permitted provided that the following conditions are met:
# #
# 1. Redistributions of source code must retain the above copyright notice, # 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer. # this list of conditions and the following disclaimer.
# #
# 2. Redistributions in binary form must reproduce the above copyright # 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the # notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution. # documentation and/or other materials provided with the distribution.
# #
# THIS SOFTWARE IS PROVIDED BY VINCENT DRIESSEN ``AS IS'' AND ANY EXPRESS OR # THIS SOFTWARE IS PROVIDED BY VINCENT DRIESSEN ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# #
# The views and conclusions contained in the software and documentation are # The views and conclusions contained in the software and documentation are
# those of the authors and should not be interpreted as representing official # those of the authors and should not be interpreted as representing official
# policies, either expressed or implied, of Vincent Driessen. # policies, either expressed or implied, of Vincent Driessen.
......
...@@ -9,17 +9,17 @@ ...@@ -9,17 +9,17 @@
# http://github.com/nvie/gitflow # http://github.com/nvie/gitflow
# #
# Copyright 2010 Vincent Driessen. All rights reserved. # Copyright 2010 Vincent Driessen. All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met: # modification, are permitted provided that the following conditions are met:
# #
# 1. Redistributions of source code must retain the above copyright notice, # 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer. # this list of conditions and the following disclaimer.
# #
# 2. Redistributions in binary form must reproduce the above copyright # 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the # notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution. # documentation and/or other materials provided with the distribution.
# #
# THIS SOFTWARE IS PROVIDED BY VINCENT DRIESSEN ``AS IS'' AND ANY EXPRESS OR # THIS SOFTWARE IS PROVIDED BY VINCENT DRIESSEN ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# #
# The views and conclusions contained in the software and documentation are # The views and conclusions contained in the software and documentation are
# those of the authors and should not be interpreted as representing official # those of the authors and should not be interpreted as representing official
# policies, either expressed or implied, of Vincent Driessen. # policies, either expressed or implied, of Vincent Driessen.
...@@ -53,7 +53,7 @@ has() { ...@@ -53,7 +53,7 @@ has() {
local item=$1; shift local item=$1; shift
echo " $@ " | grep -q " $(escape $item) " echo " $@ " | grep -q " $(escape $item) "
} }
# basic math # basic math
min() { [ "$1" -le "$2" ] && echo "$1" || echo "$2"; } min() { [ "$1" -le "$2" ] && echo "$1" || echo "$2"; }
max() { [ "$1" -ge "$2" ] && echo "$1" || echo "$2"; } max() { [ "$1" -ge "$2" ] && echo "$1" || echo "$2"; }
...@@ -343,19 +343,19 @@ require_branches_equal() { ...@@ -343,19 +343,19 @@ require_branches_equal() {
do_hook() { do_hook() {
local prefix="$1" local prefix="$1"
local return_code=0 local return_code=0
if [ -z $prefix ]; then if [ -z $prefix ]; then
die "Hook implementation error - No prefix given" die "Hook implementation error - No prefix given"
fi fi
if [ $prefix != "pre" ] && [ $prefix != "post" ]; then if [ $prefix != "pre" ] && [ $prefix != "post" ]; then
die "Hook implementation error - Bad Prefix" die "Hook implementation error - Bad Prefix"
fi fi
if [ -x ${GITFLOW_CONF_DIR_HOOKS}${prefix}_${SUBCOMMAND}_${SUBACTION} ]; then if [ -x ${GITFLOW_CONF_DIR_HOOKS}${prefix}_${SUBCOMMAND}_${SUBACTION} ]; then
${GITFLOW_CONF_DIR_HOOKS}${prefix}_${SUBCOMMAND}_${SUBACTION} ${GITFLOW_CONF_DIR_HOOKS}${prefix}_${SUBCOMMAND}_${SUBACTION}
return_code=$? return_code=$?
fi fi
if [ $return_code -gt 0 ]; then if [ $return_code -gt 0 ]; then
die "Hook command ${prefix}_${SUBCOMMAND}_${SUBACTION} failed. Exit code $return_code" die "Hook command ${prefix}_${SUBCOMMAND}_${SUBACTION} failed. Exit code $return_code"
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment