Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitflow
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tools
gitflow
Commits
aa6d016c
Commit
aa6d016c
authored
Feb 01, 2010
by
Vincent Driessen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement showing the currently checked out feature branch in feature list
overview, very Gitish.
parent
e9d2d04e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
19 deletions
+25
-19
git-flow-feature
git-flow-feature
+25
-19
No files found.
git-flow-feature
View file @
aa6d016c
...
@@ -52,23 +52,27 @@ cmd_list() {
...
@@ -52,23 +52,27 @@ cmd_list() {
exit 0
exit 0
fi
fi
CURRENT_BRANCH=$(git branch | grep '^\* ' | grep -v 'no branch' | sed 's/^* //g')
SHORT_NAMES=$(echo "$FEATURE_BRANCHES" | sed "s?^$PREFIX??g")
SHORT_NAMES=$(echo "$FEATURE_BRANCHES" | sed "s?^$PREFIX??g")
if [ $FLAGS_verbose -eq 0 ]; then
# determine column width first
echo "$SHORT_NAMES"
width=0
else
for branch in $SHORT_NAMES; do
# determine column width first
len=$(($(echo "$branch" | wc -c) - 1))
width=0
width=$(max $width $len)
for branch in $SHORT_NAMES; do
done
len=$(($(echo "$branch" | wc -c) - 1))
width=$(($width + 3))
width=$(max $width $len)
done
for branch in $SHORT_NAMES; do
width=$(($width + 3))
fullname="$PREFIX$branch"
base=$(git merge-base "$fullname" "$DEVELOP_BRANCH")
for branch in $SHORT_NAMES; do
develop_sha=$(git rev-parse "$DEVELOP_BRANCH")
fullname="$PREFIX$branch"
branch_sha=$(git rev-parse "$fullname")
base=$(git merge-base "$fullname" "$DEVELOP_BRANCH")
if [ "$fullname" = "$CURRENT_BRANCH" ]; then
develop_sha=$(git rev-parse "$DEVELOP_BRANCH")
printf "* "
branch_sha=$(git rev-parse "$fullname")
else
printf " "
fi
if [ $FLAGS_verbose -eq 1 ]; then
printf "%-${width}s" "$branch"
printf "%-${width}s" "$branch"
if [ "$branch_sha" = "$develop_sha" ]; then
if [ "$branch_sha" = "$develop_sha" ]; then
printf "(no commits yet)"
printf "(no commits yet)"
...
@@ -79,9 +83,11 @@ cmd_list() {
...
@@ -79,9 +83,11 @@ cmd_list() {
else
else
printf "(may be rebased)"
printf "(may be rebased)"
fi
fi
echo
else
done
printf "%s" "$branch"
fi
fi
echo
done
}
}
cmd_help() {
cmd_help() {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment