Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
Upstream Conversion
Commits
8886cf30faee
Commit
8886cf30
authored
Mar 13, 2021
by
Georges Racinet
🦑
Browse files
Imported fetch-stable-branches script
parent
e34e32c2fc93
Changes
2
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
8886cf30
...
...
@@ -60,5 +60,19 @@
-
Mercurial local path:
`omnibus-heptapod`
-
Mercurial push to:
[
heptapod/omnibus-heptapod
](
https://foss.heptapod.net/heptapod/omnibus-heptapod
)
## Fetching from upstream
In all cases, change first directory to the local Git clone. Example:
```
cd gitlab-ce
```
For the main repository and Omnibus, run:
```
../fetch-stable-branches
```
[
the present project
]:
https://foss.heptapod.net/heptapod/upstream-conversion
fetch-stable-branches.sh
0 → 100755
View file @
8886cf30
#!/bin/sh
#
# GitLab must have some kind of protection, because a blank 'git fetch'
# does not fetch all branches
if
!
test
-d
.git
;
then
echo
"Please run from the upstream Git clone (gitlab-ce, omnibus-gitlab etc.)"
exit
1
fi
set
-e
if
[
-z
"
$1
"
]
;
then
echo
"Fetching all stable branches from remote 'origin'"
BRANCHES
=
$(
git ls-remote origin
\
|
grep
-E
'refs/heads/13-[0-9]+.*-stable$'
\
|
sed
's/.*refs\/heads\///g'
)
fi
for
BRANCH
in
$BRANCHES
;
do
echo
"Fetching Git branch
$BRANCH
"
git fetch origin
$BRANCH
git branch
-f
$BRANCH
origin/
$BRANCH
echo
done
echo
"Fetching all tags"
git fetch
--tags
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