Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-build-utils
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
korinf
etersoft-build-utils
Commits
45035e03
Commit
45035e03
authored
Oct 07, 2010
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gpull: replace -n with -r/-m/-f options (do --ff-only by default)
parent
f528a1ad
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
5 deletions
+16
-5
gpull
bin/gpull
+16
-5
No files found.
bin/gpull
View file @
45035e03
...
@@ -8,9 +8,11 @@ if [ "$1" = "-h" ] || [ "$1" = "--help" ] ; then
...
@@ -8,9 +8,11 @@ if [ "$1" = "-h" ] || [ "$1" = "--help" ] ; then
echo
"gpull - do git pull --rebase"
echo
"gpull - do git pull --rebase"
echo
"Use: gpull [-a] [-n] [repo] [branch]"
echo
"Use: gpull [-a] [-n] [repo] [branch]"
echo
" gpull without parameters or with branch name"
echo
" gpull without parameters or with branch name"
echo
" gpull myrepo - for pull from remote myrepo gear repo"
echo
" gpull myrepo - for pull from remote myrepo gear repo
(with --rebase by default)
"
echo
" -a - pull all branches"
echo
" -a - pull all branches"
echo
" -n - do not rebase during pull"
echo
" -r - rebase during pull"
echo
" -m - do merge if possible"
echo
" -f - pull with fast forward only (default)"
echo
" -c - return error status if repo was not uptodate (gpull || echo 'Was updated last time')"
echo
" -c - return error status if repo was not uptodate (gpull || echo 'Was updated last time')"
exit
1
exit
1
fi
fi
...
@@ -28,11 +30,20 @@ if [ "$1" = "-c" ] ; then
...
@@ -28,11 +30,20 @@ if [ "$1" = "-c" ] ; then
fi
fi
if
[
"
$1
"
=
"-n"
]
;
then
REBASE
=
"--ff-only"
if
[
"
$1
"
=
"-r"
]
;
then
REBASE
=
"--rebase"
shift
fi
if
[
"
$1
"
=
"-m"
]
;
then
REBASE
=
""
REBASE
=
""
shift
shift
else
fi
REBASE
=
"--rebase"
if
[
"
$1
"
=
"-f"
]
;
then
REBASE
=
"--ff-only"
shift
fi
fi
if
is_exist_remote_repo
"
$1
"
;
then
if
is_exist_remote_repo
"
$1
"
;
then
...
...
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