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
8c92bf36
You need to sign in or sign up before continuing.
Commit
8c92bf36
authored
Mar 07, 2010
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gpull: full rewrite for support -a (all branches) and various remote repo
parent
1b692c98
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
6 deletions
+38
-6
gpull
bin/gpull
+38
-6
No files found.
bin/gpull
View file @
8c92bf36
...
@@ -6,16 +6,48 @@ load_mod git
...
@@ -6,16 +6,48 @@ load_mod git
if
[
"
$1
"
=
"-h"
]
;
then
if
[
"
$1
"
=
"-h"
]
;
then
echo
"gpull - do git pull --rebase"
echo
"gpull - do git pull --rebase"
echo
"Use: gpull [
GEAR
] [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 git.eter - for pull from git.eter gear repo"
echo
" gpull myrepo - for pull from remote myrepo gear repo"
echo
" -a - pull all branches"
echo
" -n - do not rebase during pull"
exit
1
exit
1
fi
fi
if
is_girar_name
$1
;
then
REPO
=
origin
GIRARHOST
=
$1
if
[
"
$1
"
=
"-a"
]
;
then
ALLBRANCHES
=
1
shift
fi
if
[
"
$1
"
=
"-n"
]
;
then
REBASE
=
""
shift
else
REBASE
=
"--rebase"
fi
if
is_exist_remote_repo
"
$1
"
;
then
REPO
=
$1
shift
shift
fi
fi
echo
"Pull repo from
$GIRARHOST
"
pull_all_branches
()
git pull
--rebase
$GIRARHOST
$@
{
local
CURRENTBRANCH
=
$(
get_current_branch
)
# pull all branches
for
i
in
$(
get_branch_list
)
;
do
git checkout
$i
||
fatal
"can't checkout
$i
"
git pull
$REPO
$i
done
git checkout
$CURRENTBRANCH
}
if
[
-n
"
$ALLBRANCHES
"
]
;
then
pull_all_branches
exit
fi
echo
"Pull repo from
$REPO
"
git pull
$REBASE
$REPO
$@
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