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
5bca8d93
Commit
5bca8d93
authored
Sep 25, 2012
by
Jerome Baum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create a git_do command to log git actions
parent
53e9c768
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
git-flow
git-flow
+5
-0
gitflow-common
gitflow-common
+8
-0
No files found.
git-flow
View file @
5bca8d93
...
@@ -80,6 +80,11 @@ main() {
...
@@ -80,6 +80,11 @@ main() {
# use the shFlags project to parse the command line arguments
# use the shFlags project to parse the command line arguments
.
"
$GITFLOW_DIR
/gitflow-shFlags"
.
"
$GITFLOW_DIR
/gitflow-shFlags"
FLAGS_PARENT
=
"git flow"
FLAGS_PARENT
=
"git flow"
# allow user to request git action logging
DEFINE_boolean show_commands
false
'show actions taken (git commands)'
g
# do actual parsing
FLAGS
"
$@
"
||
exit
$?
FLAGS
"
$@
"
||
exit
$?
eval set
--
"
${
FLAGS_ARGV
}
"
eval set
--
"
${
FLAGS_ARGV
}
"
...
...
gitflow-common
View file @
5bca8d93
...
@@ -70,6 +70,14 @@ noflag() { local FLAG; eval FLAG='$FLAGS_'$1; [ $FLAG -ne $FLAGS_TRUE ]; }
...
@@ -70,6 +70,14 @@ noflag() { local FLAG; eval FLAG='$FLAGS_'$1; [ $FLAG -ne $FLAGS_TRUE ]; }
# Git specific common functionality
# Git specific common functionality
#
#
git_do() {
# equivalent to git, used to indicate actions that make modifications
if flag show_commands; then
echo "git $@" >&2
fi
git "$@"
}
git_local_branches() { git branch --no-color | sed 's/^[* ] //'; }
git_local_branches() { git branch --no-color | sed 's/^[* ] //'; }
git_remote_branches() { git branch -r --no-color | sed 's/^[* ] //'; }
git_remote_branches() { git branch -r --no-color | sed 's/^[* ] //'; }
git_all_branches() { ( git branch --no-color; git branch -r --no-color) | sed 's/^[* ] //'; }
git_all_branches() { ( git branch --no-color; git branch -r --no-color) | sed 's/^[* ] //'; }
...
...
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