Skip to content
This repository was archived by the owner on Jun 19, 2023. It is now read-only.

Commit 3e05e2a

Browse files
Merge branch 'release/1.11.0'
2 parents e9bea99 + a3192c0 commit 3e05e2a

15 files changed

+284
-119
lines changed

AUTHORS

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ git-flow AVH Authors
22

33
This software consists of voluntary contributions made by many
44
individuals. For exact contribution history, see the revision history
5-
(Changes.mdown) and logs, available at
5+
and logs, available at
66
http://github.com/petervanderdoes/gitflow.
77

88

Changes.mdown CHANGELOG.md

+102-86
Large diffs are not rendered by default.

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#
22
# Authors:
3-
# Copyright 2012-2016 Peter van der Does. All rights reserved.
3+
# Copyright 2012-2017 Peter van der Does. All rights reserved.
44
#
55
# Original Author:
66
# Copyright 2010 Vincent Driessen. All rights reserved.

README.mdown README.md

File renamed without changes.

git-flow

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# http://github.com/petervanderdoes/gitflow
1111
#
1212
# Authors:
13-
# Copyright 2012-2016 Peter van der Does. All rights reserved.
13+
# Copyright 2012-2017 Peter van der Does. All rights reserved.
1414
#
1515
# Original Author:
1616
# Copyright 2010 Vincent Driessen. All rights reserved.

git-flow-bugfix

+27-4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# $Id$
2+
# vim:et:ft=sh:sts=2:sw=2
13
#
24
# git-flow -- A collection of Git extensions to provide high-level
35
# repository operations for Vincent Driessen's branching model.
@@ -9,7 +11,7 @@
911
# http://github.com/petervanderdoes/gitflow
1012
#
1113
# Authors:
12-
# Copyright 2012-2016 Peter van der Does. All rights reserved.
14+
# Copyright 2012-2017 Peter van der Does. All rights reserved.
1315
#
1416
# Original Author:
1517
# Copyright 2010 Vincent Driessen. All rights reserved.
@@ -243,6 +245,7 @@ showcommands! Show git commands while executing them
243245
F,[no]fetch Fetch from origin before performing finish
244246
r,[no]rebase Rebase before merging
245247
p,[no]preserve-merges Preserve merges while rebasing
248+
[no]push Push to origin after performing finish
246249
k,[no]keep Keep branch after performing finish
247250
keepremote! Keep the remote branch
248251
keeplocal! Keep the local branch
@@ -256,6 +259,7 @@ no-ff! Never fast-forward during the merge
256259
DEFINE_boolean 'fetch' false "fetch from $ORIGIN before performing finish" F
257260
DEFINE_boolean 'rebase' false "rebase before merging" r
258261
DEFINE_boolean 'preserve-merges' false 'try to recreate merges while rebasing' p
262+
DEFINE_boolean 'push' false "push to $ORIGIN after performing finish"
259263
DEFINE_boolean 'keep' false "keep branch after performing finish" k
260264
DEFINE_boolean 'keepremote' false "keep the remote branch"
261265
DEFINE_boolean 'keeplocal' false "keep the local branch"
@@ -268,6 +272,7 @@ no-ff! Never fast-forward during the merge
268272
gitflow_override_flag_boolean "bugfix.finish.fetch" "fetch"
269273
gitflow_override_flag_boolean "bugfix.finish.rebase" "rebase"
270274
gitflow_override_flag_boolean "bugfix.finish.preserve-merges" "preserve_merges"
275+
gitflow_override_flag_boolean "bugfix.finish.push" "push"
271276
gitflow_override_flag_boolean "bugfix.finish.keep" "keep"
272277
gitflow_override_flag_boolean "bugfix.finish.keepremote" "keepremote"
273278
gitflow_override_flag_boolean "bugfix.finish.keeplocal" "keeplocal"
@@ -464,6 +469,10 @@ helper_finish_cleanup() {
464469
fi
465470
fi
466471

472+
if flag push; then
473+
git_do push "$ORIGIN" "$BASE_BRANCH" || die "Could not push branch '$BASE_BRANCH' to remote '$ORIGIN'."
474+
fi
475+
467476
echo
468477
echo "Summary of actions:"
469478
echo "- The bugfix branch '$BRANCH' was merged into '$BASE_BRANCH'"
@@ -650,7 +659,9 @@ p,[no]preserve-merges Preserve merges
650659
BASE_BRANCH=${BASE_BRANCH:-$DEVELOP_BRANCH}
651660

652661
warn "Will try to rebase '$NAME' which is based on '$BASE_BRANCH'..."
653-
require_clean_working_tree
662+
if ! git_config_bool_exists "rebase.autostash"; then
663+
require_clean_working_tree
664+
fi
654665
require_branch "$BRANCH"
655666

656667
git_local_branch_exists "$BASE_BRANCH" || die "The base '$BASE_BRANCH' doesn't exists locally or is not a branch. Can't rebase the bugfix branch '$BRANCH'."
@@ -794,13 +805,13 @@ r,[no]remote Delete remote branch
794805
if git_is_branch_merged_into "$BRANCH" "$BASE_BRANCH"; then
795806
git_do branch -d "$BRANCH" || die "Could not delete the $BRANCH."
796807
if flag remote; then
797-
git_do push "$ORIGIN" :"$BRANCH" || die "Could not delete the remote $BRANCH in $ORIGIN."
808+
git_remote_branch_delete "$BRANCH"
798809
fi
799810
else
800811
if flag force; then
801812
git_do branch -D "$BRANCH" || die "Could not delete the $BRANCH."
802813
if flag remote; then
803-
git_do push "$ORIGIN" :"$BRANCH" || die "Could not delete the remote $BRANCH in $ORIGIN."
814+
git_remote_branch_delete "$BRANCH"
804815
fi
805816
else
806817
die "bugfix branch '$BRANCH' has been not been merged yet. Use -f to force the deletion."
@@ -817,3 +828,15 @@ r,[no]remote Delete remote branch
817828
echo "- You are now on branch '$(git_current_branch)'"
818829
echo
819830
}
831+
832+
cmd_rename() {
833+
OPTIONS_SPEC="\
834+
git flow bugfix rename <new_name> [<new_name>]
835+
836+
Rename a given bugfix branch
837+
--
838+
h,help! Show this help
839+
showcommands! Show git commands while executing them
840+
"
841+
gitflow_rename_branch "$@"
842+
}

git-flow-config

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# $Id$
2+
# vim:et:ft=sh:sts=2:sw=2
13
#
24
# git-flow -- A collection of Git extensions to provide high-level
35
# repository operations for Vincent Driessen's branching model.
@@ -9,7 +11,7 @@
911
# http://github.com/petervanderdoes/gitflow
1012
#
1113
# Authors:
12-
# Copyright 2012-2016 Peter van der Does. All rights reserved.
14+
# Copyright 2012-2017 Peter van der Does. All rights reserved.
1315
#
1416
#
1517
# Redistribution and use in source and binary forms, with or without

git-flow-feature

+21-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
#@IgnoreInspection BashAddShebang
1+
# $Id$
2+
# vim:et:ft=sh:sts=2:sw=2
23
#
34
# git-flow -- A collection of Git extensions to provide high-level
45
# repository operations for Vincent Driessen's branching model.
@@ -10,7 +11,7 @@
1011
# http://github.com/petervanderdoes/gitflow
1112
#
1213
# Authors:
13-
# Copyright 2012-2016 Peter van der Does. All rights reserved.
14+
# Copyright 2012-2017 Peter van der Does. All rights reserved.
1415
#
1516
# Original Author:
1617
# Copyright 2010 Vincent Driessen. All rights reserved.
@@ -658,7 +659,10 @@ p,[no]preserve-merges Preserve merges
658659
BASE_BRANCH=${BASE_BRANCH:-$DEVELOP_BRANCH}
659660

660661
warn "Will try to rebase '$NAME' which is based on '$BASE_BRANCH'..."
661-
require_clean_working_tree
662+
if ! git_config_bool_exists "rebase.autostash"; then
663+
require_clean_working_tree
664+
fi
665+
662666
require_branch "$BRANCH"
663667

664668
git_local_branch_exists "$BASE_BRANCH" || die "The base '$BASE_BRANCH' doesn't exists locally or is not a branch. Can't rebase the feature branch '$BRANCH'."
@@ -802,13 +806,13 @@ r,[no]remote Delete remote branch
802806
if git_is_branch_merged_into "$BRANCH" "$BASE_BRANCH"; then
803807
git_do branch -d "$BRANCH" || die "Could not delete the $BRANCH."
804808
if flag remote; then
805-
git_do push "$ORIGIN" :"$BRANCH" || die "Could not delete the remote $BRANCH in $ORIGIN."
809+
git_remote_branch_delete "$BRANCH"
806810
fi
807811
else
808812
if flag force; then
809813
git_do branch -D "$BRANCH" || die "Could not delete the $BRANCH."
810814
if flag remote; then
811-
git_do push "$ORIGIN" :"$BRANCH" || die "Could not delete the remote $BRANCH in $ORIGIN."
815+
git_remote_branch_delete "$BRANCH"
812816
fi
813817
else
814818
die "Feature branch '$BRANCH' has been not been merged yet. Use -f to force the deletion."
@@ -825,3 +829,15 @@ r,[no]remote Delete remote branch
825829
echo "- You are now on branch '$(git_current_branch)'"
826830
echo
827831
}
832+
833+
cmd_rename() {
834+
OPTIONS_SPEC="\
835+
git flow feature rename <new_name> [<new_name>]
836+
837+
Rename a given feature branch
838+
--
839+
h,help! Show this help
840+
showcommands! Show git commands while executing them
841+
"
842+
gitflow_rename_branch "$@"
843+
}

git-flow-hotfix

+21-5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# $Id$
2+
# vim:et:ft=sh:sts=2:sw=2
13
#
24
# git-flow -- A collection of Git extensions to provide high-level
35
# repository operations for Vincent Driessen's branching model.
@@ -9,7 +11,7 @@
911
# http://github.com/petervanderdoes/gitflow
1012
#
1113
# Authors:
12-
# Copyright 2012-2016 Peter van der Does. All rights reserved.
14+
# Copyright 2012-2017 Peter van der Does. All rights reserved.
1315
#
1416
# Original Author:
1517
# Copyright 2010 Vincent Driessen. All rights reserved.
@@ -186,7 +188,7 @@ F,[no]fetch Fetch from origin before performing local operation
186188

187189
# No need to continue if not clean
188190
require_base_is_local_branch "$base"
189-
require_clean_working_tree
191+
git_config_bool_exists "gitflow.allowdirty" || require_clean_working_tree
190192
gitflow_config_set_base_branch $base $BRANCH
191193

192194
# Update the local repo with remote changes, if asked
@@ -309,7 +311,9 @@ p,[no]preserve-merges Preserve merges
309311
BASE_BRANCH=${BASE_BRANCH:-$DEVELOP_BRANCH}
310312

311313
warn "Will try to rebase '$NAME' which is based on '$BASE_BRANCH'..."
312-
require_clean_working_tree
314+
if ! git_config_bool_exists "rebase.autostash"; then
315+
require_clean_working_tree
316+
fi
313317
require_branch "$BRANCH"
314318

315319
git_local_branch_exists "$BASE_BRANCH" || die "The base '$BASE_BRANCH' doesn't exists locally or is not a branch. Can't rebase the hotfixe branch '$BRANCH'."
@@ -701,13 +705,13 @@ r,[no]remote Delete remote branch
701705
if ( git_is_branch_merged_into "$BRANCH" "$MASTER_BRANCH" && git_is_branch_merged_into "$BRANCH" "$DEVELOP_BRANCH" ); then
702706
git_do branch -d "$BRANCH" || die "Could not delete the $BRANCH."
703707
if flag remote; then
704-
git_do push "$ORIGIN" :"$BRANCH" || die "Could not delete the remote $BRANCH in $ORIGIN."
708+
git_remote_branch_delete "$BRANCH"
705709
fi
706710
else
707711
if flag force; then
708712
git_do branch -D "$BRANCH" || die "Could not delete the $BRANCH."
709713
if flag remote; then
710-
git_do push "$ORIGIN" :"$BRANCH" || die "Could not delete the remote $BRANCH in $ORIGIN."
714+
git_remote_branch_delete "$BRANCH"
711715
fi
712716
else
713717
die "Hotfix branch '$BRANCH' has been not been merged in branch '$MASTER_BRANCH' and/or branch '$DEVELOP_BRANCH'. Use -f to force the deletion."
@@ -724,3 +728,15 @@ r,[no]remote Delete remote branch
724728
echo "- You are now on branch '$(git_current_branch)'"
725729
echo
726730
}
731+
732+
cmd_rename() {
733+
OPTIONS_SPEC="\
734+
git flow hotfix rename <new_name> [<new_name>]
735+
736+
Rename a given hotfix branch
737+
--
738+
h,help! Show this help
739+
showcommands! Show git commands while executing them
740+
"
741+
gitflow_rename_branch "$@"
742+
}

git-flow-init

+12-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# $Id$
2+
# vim:et:ft=sh:sts=2:sw=2
13
#
24
# git-flow -- A collection of Git extensions to provide high-level
35
# repository operations for Vincent Driessen's branching model.
@@ -9,7 +11,7 @@
911
# http://github.com/petervanderdoes/gitflow
1012
#
1113
# Authors:
12-
# Copyright 2012-2016 Peter van der Does. All rights reserved.
14+
# Copyright 2012-2017 Peter van der Does. All rights reserved.
1315
#
1416
# Original Author:
1517
# Copyright 2010 Vincent Driessen. All rights reserved.
@@ -89,7 +91,7 @@ file= use given config file
8991
parse_args "$@"
9092

9193
if [ "$FLAGS_file" != "" ]; then
92-
gitflow_config_option="--file '$FLAGS_file''"
94+
gitflow_config_option="--file $FLAGS_file"
9395
elif flag local; then
9496
gitflow_config_option="--local"
9597
elif flag global; then
@@ -100,6 +102,14 @@ file= use given config file
100102
gitflow_config_option=""
101103
fi
102104

105+
if git_config_bool_exists "user.useconfigonly"; then
106+
user_email=$(git config --get user.email)
107+
user_name=$(git config --get user.name)
108+
if [ -z "${user_email}" ] || [ -z "${user_name}" ]; then
109+
die "Configuration useconfigonly is set but no name and/or email was set"
110+
fi
111+
fi
112+
103113
if ! git rev-parse --git-dir >/dev/null 2>&1; then
104114
git_do init
105115
else

git-flow-log

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# $Id$
2+
# vim:et:ft=sh:sts=2:sw=2
13
#
24
# git-flow -- A collection of Git extensions to provide high-level
35
# repository operations for Vincent Driessen's branching model.
@@ -9,7 +11,7 @@
911
# http://github.com/petervanderdoes/gitflow
1012
#
1113
# Authors:
12-
# Copyright 2012-2016 Peter van der Does. All rights reserved.
14+
# Copyright 2012-2017 Peter van der Does. All rights reserved.
1315
#
1416
# Original Author:
1517
# Copyright 2010 Vincent Driessen. All rights reserved.

git-flow-release

+9-5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# $Id$
2+
# vim:et:ft=sh:sts=2:sw=2
13
#
24
# git-flow -- A collection of Git extensions to provide high-level
35
# repository operations for Vincent Driessen's branching model.
@@ -9,7 +11,7 @@
911
# http://github.com/petervanderdoes/gitflow
1012
#
1113
# Authors:
12-
# Copyright 2012-2016 Peter van der Does. All rights reserved.
14+
# Copyright 2012-2017 Peter van der Does. All rights reserved.
1315
#
1416
# Original Author:
1517
# Copyright 2010 Vincent Driessen. All rights reserved.
@@ -565,7 +567,7 @@ v,verbose! Verbose (more) output
565567
require_no_existing_release_branches
566568

567569
# Sanity checks
568-
require_clean_working_tree
570+
git_config_bool_exists "gitflow.allowdirty" || require_clean_working_tree
569571
require_branch_absent "$BRANCH"
570572
require_tag_absent "$VERSION_PREFIX$VERSION"
571573
if flag fetch; then
@@ -999,7 +1001,9 @@ p,[no]preserve-merges Preserve merges
9991001
BASE_BRANCH=${BASE_BRANCH:-$DEVELOP_BRANCH}
10001002

10011003
warn "Will try to rebase '$NAME' which is based on '$BASE_BRANCH'..."
1002-
require_clean_working_tree
1004+
if ! git_config_bool_exists "rebase.autostash"; then
1005+
require_clean_working_tree
1006+
fi
10031007
require_branch "$BRANCH"
10041008

10051009
git_local_branch_exists "$BASE_BRANCH" || die "The base '$BASE_BRANCH' doesn't exists locally or is not a branch. Can't rebase the release branch '$BRANCH'."
@@ -1062,13 +1066,13 @@ r,[no]remote Delete remote branch
10621066
if ( git_is_branch_merged_into "$BRANCH" "$MASTER_BRANCH" && git_is_branch_merged_into "$BRANCH" "$BASE_BRANCH" ); then
10631067
git_do branch -d "$BRANCH" || die "Could not delete the $BRANCH."
10641068
if flag remote; then
1065-
git_do push "$ORIGIN" :"$BRANCH" || die "Could not delete the remote $BRANCH in $ORIGIN."
1069+
git_remote_branch_delete "$BRANCH"
10661070
fi
10671071
else
10681072
if flag force; then
10691073
git_do branch -D "$BRANCH" || die "Could not delete the $BRANCH."
10701074
if flag remote; then
1071-
git_do push "$ORIGIN" :"$BRANCH" || die "Could not delete the remote $BRANCH in $ORIGIN."
1075+
git_remote_branch_delete "$BRANCH"
10721076
fi
10731077
else
10741078
die "Release branch '$BRANCH' has been not been merged in branch '$MASTER_BRANCH' and/or branch '$BASE_BRANCH'. Use -f to force the deletion."

0 commit comments

Comments
 (0)