-
Notifications
You must be signed in to change notification settings - Fork 1
Bugfix/help text and reorder rename args #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -609,15 +609,17 @@ gitflow_rename_branch() { | |
# read arguments into global variables | ||
if [ -z $1 ]; then | ||
NEW_NAME='' | ||
else | ||
NEW_NAME=$1 | ||
fi | ||
|
||
if [ -z $2 ]; then | ||
NAME='' | ||
else | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nesting the if else block used to determin how to call rename inside of this else made the code a little harder for me to initially follow as I had to go back up and figure out the context of when it's called. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Propose an alternative? |
||
NAME=$2 | ||
if [ -z $2 ]; then | ||
NAME='' | ||
NEW_NAME=$1 | ||
else | ||
NAME=$1 | ||
NEW_NAME=$2 | ||
fi | ||
fi | ||
|
||
BRANCH=${PREFIX}${NAME} | ||
NEW_BRANCH=${PREFIX}${NEW_NAME} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we testing to see if the first variable passed in is a null string here when we perform the exact same test a few lines down for the second variable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the user may provide 0, 1, or 2 args?
Also note, this PR did not change that line.