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

<fix>(git-glow-log): fixed help message #460

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ Justin Penney
Konstantin Tjuterev
Kridsada Thanabulpong
Leonardo Giordani
Luis Fernando Gomes @luiscoms
Mark Borcherding
Mark Derricutt
Mateusz Kaczmarek
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@

# Changelog

#### 1.12.4-dev0
* Preparation for next release

#### 1.12.3
* Explicitly get the default values from the system and global config.

Expand Down
4 changes: 2 additions & 2 deletions git-flow-log
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ usage() {
OPTIONS_SPEC="\
git flow log

shows current branch log compared to develop
shows current branch log compared to base branch
'git help log' for arguments
--
"
Expand All @@ -69,7 +69,7 @@ cmd_list() {
OPTIONS_SPEC="\
git flow feature log [<options>]

Show log on <feature> branch since the fork of <develop> branch
Show log on current branch since the fork of base branch
Options come from git log
--
h,help! Show this help
Expand Down
35 changes: 27 additions & 8 deletions git-flow-release
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,15 @@ _finish_from_develop() {
# but the merge into master was successful, we skip it now
if ! git_is_branch_merged_into "$BRANCH" "$MASTER_BRANCH"; then
git_do checkout "$MASTER_BRANCH" || die "Could not check out branch '$MASTER_BRANCH'."

opts=""
noflag edit && opts="$opts --no-edit"
if noflag squash; then
git_do merge --no-ff "$BRANCH" || die "There were merge conflicts." # TODO: What do we do now?
git_do merge --no-ff $opts "$BRANCH" || die "There were merge conflicts." # TODO: What do we do now?
else
git_do merge --squash "$BRANCH" || die "There were merge conflicts." # TODO: What do we do now?
git_do merge --squash $opts "$BRANCH" || die "There were merge conflicts." # TODO: What do we do now?
flag squash_info && gitflow_create_squash_message "Merged release branch '$BRANCH'" "$MASTER_BRANCH" "$BRANCH" > "$DOT_GIT_DIR/SQUASH_MSG"
git_do commit
git_do commit $opts
fi
fi

Expand All @@ -131,6 +134,12 @@ _finish_from_develop() {
opts="$opts -m '$FLAGS_message'"
fi
[ "$FLAGS_messagefile" != "" ] && opts="$opts -F '$FLAGS_messagefile'"
if noflag edit; then
if [ "$FLAGS_message" = "" ] && [ "$FLAGS_messagefile" = "" ]; then
# in order to fix annotated tag without message
opts="$opts -m $VERSION_PREFIX$TAGNAME"
fi
fi
eval git_do tag $opts "$VERSION_PREFIX$TAGNAME" || die "Tagging failed. Please run finish again to retry."
fi
fi
Expand All @@ -150,6 +159,8 @@ _finish_from_develop() {
if ! git_is_branch_merged_into "$merge_branch" "$DEVELOP_BRANCH"; then
git_do checkout "$DEVELOP_BRANCH" || die "Could not check out branch '$DEVELOP_BRANCH'."

opts=""
noflag edit && opts="$opts --no-edit"
if noflag nobackmerge; then
# Accounting for 'git describe', if a release is tagged
# we use the tag commit instead of the branch.
Expand All @@ -158,15 +169,15 @@ _finish_from_develop() {
else
commit="$MASTER_BRANCH"
fi
git_do merge --no-ff "$commit" || die "There were merge conflicts." # TODO: What do we do now?
git_do merge --no-ff $opts "$commit" || die "There were merge conflicts." # TODO: What do we do now?
else
commit="$BRANCH"
if noflag squash; then
git_do merge --no-ff "$commit" || die "There were merge conflicts." # TODO: What do we do now?
git_do merge --no-ff $opts "$commit" || die "There were merge conflicts." # TODO: What do we do now?
else
git_do merge --squash "$commit" || die "There were merge conflicts." # TODO: What do we do now?
git_do merge --squash $opts "$commit" || die "There were merge conflicts." # TODO: What do we do now?
flag squash_info && gitflow_create_squash_message "Merged release branch '$BRANCH'" "$DEVELOP_BRANCH" "$BRANCH" > "$DOT_GIT_DIR/SQUASH_MSG"
git_do commit
git_do commit $opts
fi
fi
fi
Expand Down Expand Up @@ -325,6 +336,12 @@ _finish_base() {
opts="$opts -m '$FLAGS_message'"
fi
[ "$FLAGS_messagefile" != "" ] && opts="$opts -F '$FLAGS_messagefile'"
if noflag edit; then
if [ "$FLAGS_message" = "" ] && [ "$FLAGS_messagefile" = "" ]; then
# in order to fix annotated tag without message
opts="$opts -m $VERSION_PREFIX$TAGNAME"
fi
fi
eval git_do tag $opts "$VERSION_PREFIX$TAGNAME" || die "Tagging failed. Please run finish again to retry."
fi
fi
Expand Down Expand Up @@ -603,7 +620,7 @@ v,verbose! Verbose (more) output

cmd_finish() {
OPTIONS_SPEC="\
git flow release finish [-h] [-F] [-s] [-u] [-m | -f] [-p] [-k] [-n] [-b] [-S] <version>
git flow release finish [-h] [-F] [-s] [-u] [-m | -f] [-p] [-k] [-n] [-b] [-S] [-e] <version>


Finish a release branch
Expand All @@ -627,6 +644,7 @@ n,[no]tag Don't tag this release
b,[no]nobackmerge Don't back-merge master, or tag if applicable, in develop
S,[no]squash Squash release during merge
[no]ff-master Fast forward master branch if possible
e,[no]edit The --noedit option can be used to accept the auto-generated message on merging
T,tagname! Use given tag name
nodevelopmerge! Don't back-merge develop branch
"
Expand All @@ -649,6 +667,7 @@ nodevelopmerge! Don't back-merge develop branch
DEFINE_boolean 'squash' false "squash release during merge" S
DEFINE_boolean 'squash-info' false "add branch info during squash"
DEFINE_boolean 'ff-master' false "fast forward master branch if possible"
DEFINE_boolean 'edit' true "accept the auto-generated message on merging" e
DEFINE_string 'tagname' "" "use the given tag name" T
DEFINE_boolean 'nodevelopmerge' false "don't merge $BRANCH into $DEVELOP_BRANCH "

Expand Down
2 changes: 1 addition & 1 deletion git-flow-version
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

GITFLOW_VERSION=1.12.3
GITFLOW_VERSION=1.12.4-dev0

initialize() {
# A function can not be empty. Comments count as empty.
Expand Down