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
144bb507
Commit
144bb507
authored
Jan 25, 2010
by
Vincent Driessen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unified notation for stderr file descriptor redirection.
parent
7238e295
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
gitflow-sh-setup
gitflow-sh-setup
+5
-5
No files found.
gitflow-sh-setup
View file @
144bb507
...
@@ -24,34 +24,34 @@ warn() { echo "$@" >&2; }
...
@@ -24,34 +24,34 @@ warn() { echo "$@" >&2; }
die
()
{
warn
"
$@
"
;
exit
1
;
}
die
()
{
warn
"
$@
"
;
exit
1
;
}
gitflow_check_clean_working_tree
()
{
gitflow_check_clean_working_tree
()
{
if
[
"
$(
git status 2>
/dev/null |
tail
-n1
)
"
!=
"nothing to commit (working directory clean)"
]
;
then
if
[
"
$(
git status 2>/dev/null |
tail
-n1
)
"
!=
"nothing to commit (working directory clean)"
]
;
then
die
"Working directory is dirty. Only use gitflow in clean working directories for your own safety."
die
"Working directory is dirty. Only use gitflow in clean working directories for your own safety."
fi
fi
}
}
gitflow_require_local_branch
()
{
gitflow_require_local_branch
()
{
echo
"
$LOCAL_BRANCHES
"
|
grep
"^
$1
\$
"
2>
/dev/null
>
/dev/null
echo
"
$LOCAL_BRANCHES
"
|
grep
"^
$1
\$
"
2>
&1
>
/dev/null
if
[
$?
-ne
0
]
;
then
if
[
$?
-ne
0
]
;
then
die
"Local branch '
$1
' does not exist and is required."
die
"Local branch '
$1
' does not exist and is required."
fi
fi
}
}
gitflow_require_remote_branch
()
{
gitflow_require_remote_branch
()
{
echo
"
$REMOTE_BRANCHES
"
|
grep
"^
$1
\$
"
2>
/dev/null
>
/dev/null
echo
"
$REMOTE_BRANCHES
"
|
grep
"^
$1
\$
"
2>
&1
>
/dev/null
if
[
$?
-ne
0
]
;
then
if
[
$?
-ne
0
]
;
then
die
"Remote branch '
$1
' does not exist and is required."
die
"Remote branch '
$1
' does not exist and is required."
fi
fi
}
}
gitflow_require_branch
()
{
gitflow_require_branch
()
{
echo
"
$ALL_BRANCHES
"
|
grep
"^
$1
\$
"
2>
/dev/null
>
/dev/null
echo
"
$ALL_BRANCHES
"
|
grep
"^
$1
\$
"
2>
&1
>
/dev/null
if
[
$?
-ne
0
]
;
then
if
[
$?
-ne
0
]
;
then
die
"Branch '
$1
' does not exist and is required."
die
"Branch '
$1
' does not exist and is required."
fi
fi
}
}
gitflow_require_branch_absent
()
{
gitflow_require_branch_absent
()
{
echo
"
$ALL_BRANCHES
"
|
grep
"^
$1
\$
"
2>
/dev/null
>
/dev/null
echo
"
$ALL_BRANCHES
"
|
grep
"^
$1
\$
"
2>
&1
>
/dev/null
if
[
$?
-eq
0
]
;
then
if
[
$?
-eq
0
]
;
then
die
"Branch '
$1
' already exists. Pick another name."
die
"Branch '
$1
' already exists. Pick another name."
fi
fi
...
...
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