* [PATCH] fetch2: Change git fetcher not to destroy old references
@ 2020-07-08 11:12 Richard Purdie
2020-07-08 12:12 ` [bitbake-devel] " Mikko Rapeli
0 siblings, 1 reply; 2+ messages in thread
From: Richard Purdie @ 2020-07-08 11:12 UTC (permalink / raw)
To: bitbake-devel
It looks like we're about to see a lot of changes in branch names in repos. If
we have the prune option here, those old names are lost, the changes propagate
to our source mirrors and our old releases break.
We have the force option so any replaced references should be replaced, its only
orphaned branches which will now be preerved.
I believe this behaviour will cause use fewer problems given the changes that
look likely to happen.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
lib/bb/fetch2/git.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py
index dbf8715674..644ba9238b 100644
--- a/lib/bb/fetch2/git.py
+++ b/lib/bb/fetch2/git.py
@@ -355,7 +355,7 @@ class Git(FetchMethod):
runfetchcmd("%s remote rm origin" % ud.basecmd, d, workdir=ud.clonedir)
runfetchcmd("%s remote add --mirror=fetch origin %s" % (ud.basecmd, repourl), d, workdir=ud.clonedir)
- fetch_cmd = "LANG=C %s fetch -f --prune --progress %s refs/*:refs/*" % (ud.basecmd, repourl)
+ fetch_cmd = "LANG=C %s fetch -f --progress %s refs/*:refs/*" % (ud.basecmd, repourl)
if ud.proto.lower() != 'file':
bb.fetch2.check_network_access(d, fetch_cmd, ud.url)
progresshandler = GitProgressHandler(d)
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [bitbake-devel] [PATCH] fetch2: Change git fetcher not to destroy old references
2020-07-08 11:12 [PATCH] fetch2: Change git fetcher not to destroy old references Richard Purdie
@ 2020-07-08 12:12 ` Mikko Rapeli
0 siblings, 0 replies; 2+ messages in thread
From: Mikko Rapeli @ 2020-07-08 12:12 UTC (permalink / raw)
To: richard.purdie; +Cc: bitbake-devel
On Wed, Jul 08, 2020 at 12:12:15PM +0100, Richard Purdie wrote:
> It looks like we're about to see a lot of changes in branch names in repos. If
> we have the prune option here, those old names are lost, the changes propagate
> to our source mirrors and our old releases break.
>
> We have the force option so any replaced references should be replaced, its only
> orphaned branches which will now be preerved.
Typo: reserved.
>
> I believe this behaviour will cause use fewer problems given the changes that
> look likely to happen.
Typo: us
Thanks for this patch!
I too hope this will cause less issues when upstreams tingle with branches in their repos.
What annoys me slightly is that we expect a commit-id to always be in a specific branch
and don't fall back to using the commit-id from an older release tag for example if upstream
decides to wipe all branches but still keeps the old release tags in repo. Of course
sometimes when this happens with our own repos it's nice to see a build failure...
Reviewed-by: Mikko Rapeli <mikko.rapeli@bmw.de>
Cheers,
-Mikko
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
> lib/bb/fetch2/git.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py
> index dbf8715674..644ba9238b 100644
> --- a/lib/bb/fetch2/git.py
> +++ b/lib/bb/fetch2/git.py
> @@ -355,7 +355,7 @@ class Git(FetchMethod):
> runfetchcmd("%s remote rm origin" % ud.basecmd, d, workdir=ud.clonedir)
>
> runfetchcmd("%s remote add --mirror=fetch origin %s" % (ud.basecmd, repourl), d, workdir=ud.clonedir)
> - fetch_cmd = "LANG=C %s fetch -f --prune --progress %s refs/*:refs/*" % (ud.basecmd, repourl)
> + fetch_cmd = "LANG=C %s fetch -f --progress %s refs/*:refs/*" % (ud.basecmd, repourl)
> if ud.proto.lower() != 'file':
> bb.fetch2.check_network_access(d, fetch_cmd, ud.url)
> progresshandler = GitProgressHandler(d)
> --
> 2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-08 12:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-08 11:12 [PATCH] fetch2: Change git fetcher not to destroy old references Richard Purdie
2020-07-08 12:12 ` [bitbake-devel] " Mikko Rapeli
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.