Added cmd_list and cmd_diff to git-flow-feature.
This commit is contained in:
parent
4e5c3e9915
commit
bd4f095186
1 changed files with 21 additions and 1 deletions
|
@ -13,10 +13,12 @@
|
|||
#
|
||||
|
||||
usage() {
|
||||
echo "usage: git flow start feature <name> [<base>]"
|
||||
echo "usage: git flow list feature"
|
||||
echo " git flow start feature <name> [<base>]"
|
||||
echo " git flow finish feature <name> [<base>]"
|
||||
echo " git flow publish feature <name>"
|
||||
echo " git flow track feature <name>"
|
||||
echo " git flow diff feature <name>"
|
||||
# TODO
|
||||
#echo ""
|
||||
#echo "options:"
|
||||
|
@ -154,3 +156,21 @@ cmd_track() {
|
|||
echo "- You are now on branch '$BRANCH'"
|
||||
echo
|
||||
}
|
||||
|
||||
cmd_list() {
|
||||
# TODO: refactor this, because passing in this dummy "foo" is really ugly!
|
||||
parse_args "$@" foo
|
||||
FEATURE_BRANCHES="$(echo "$LOCAL_BRANCHES" | grep "^$PREFIX")"
|
||||
if [ -z "$FEATURE_BRANCHES" ]; then
|
||||
warn "No feature branches exist."
|
||||
exit 1
|
||||
fi
|
||||
echo "$FEATURE_BRANCHES" | sed "s?^$PREFIX??g"
|
||||
}
|
||||
|
||||
cmd_diff() {
|
||||
parse_args "$@"
|
||||
# TODO: if this feature has been based on a non-develop branch, we really
|
||||
# should not be comparing to $DEVELOP. How to deal with this?
|
||||
git diff $DEVELOP..$BRANCH
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue