nvie/gitflow — Issue #187: Verbose output of feature list is potentially incorrect
Author: petervanderdoes
Created: 2012-01-06 14:37:38+00:00
State: open

The command `git flow feature list -v` displays the wrong output when a feature is based on a branch other than the develop branch.

The current code gets the merge-base from the develop branch, even though I could have picked a different branch as a starting point.

```shell
for branch in $short_names; do
local fullname=$PREFIX$branch
local base=$(git merge-base "$fullname" "$DEVELOP_BRANCH")
local develop_sha=$(git rev-parse "$DEVELOP_BRANCH")
local branch_sha=$(git rev-parse "$fullname")
if [ "$fullname" = "$current_branch" ]; then
printf "* "
else
printf " "
fi
if flag verbose; then
printf "%-${width}s" "$branch"
if [ "$branch_sha" = "$develop_sha" ]; then
printf "(no commits yet)"
elif [ "$base" = "$branch_sha" ]; then
printf "(is behind develop, may ff)"
elif [ "$base" = "$develop_sha" ]; then
printf "(based on latest develop)"
else
printf "(may be rebased)"
fi
else
printf "%s" "$branch"
fi
echo
done
```