Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Arch Linux
repod
Commits
250d124b
Verified
Commit
250d124b
authored
Oct 05, 2019
by
Jan Alexander Steffens (heftig)
Browse files
Try to speed up transfer by caching packages' refs
parent
bd7326f6
Changes
1
Show whitespace changes
Inline
Side-by-side
db-update
View file @
250d124b
...
...
@@ -99,10 +99,22 @@ async def main(_args) -> int:
lock_tag
(
pkggitdir
,
pkgver
)
await
run
(
"git"
,
"fetch"
,
pkggitdir
,
f
"refs/tags/
{
pkgver
}
"
)
tagref
=
"refs/last-tag"
cacherefs
=
f
"refs/packages/
{
pkgbase
}
/*"
await
run
(
"git"
,
"fetch"
,
"--no-tags"
,
"--prune"
,
f
"--negotiation-tip=
{
cacherefs
}
"
,
pkggitdir
,
f
"+refs/heads/*:
{
cacherefs
}
"
,
f
"+refs/tags/
{
pkgver
}
:
{
tagref
}
"
,
)
if
pkgdir
.
exists
():
await
run
(
"git"
,
"rm"
,
"-r"
,
pkgdir
)
await
run
(
"git"
,
"read-tree"
,
f
"--prefix=
{
pkgdir
}
"
,
"-u"
,
"FETCH_HEAD"
)
await
run
(
"git"
,
"read-tree"
,
f
"--prefix=
{
pkgdir
}
"
,
"-u"
,
tagref
)
message
.
append
(
f
"Released
{
pkgbase
}
{
pkgver
}
to
{
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