[pkg-go] pkg-go will migrate to salsa.debian.org on 2018-04-02
Martín Ferrari
tincho at debian.org
Sat Apr 7 15:50:00 UTC 2018
On 27/03/18 22:24, Alexandre Viau wrote:
> === After the migration ===
> - You may point your git working directories to the new remote address
> with this oneliner:
> ``git remote set-url origin git at salsa.debian.org:go-team/$(git
> config --get remote.origin.url | tr "/" "\n" | tail -n 1)``
Today I am finally updating my local repos, but this script is not good
for me, as I usually call my debian remote "debian". So I used this
instead (to fix all the repos in one directory):
for i in */; do test -d $i/.git || continue; git --git-dir=$i/.git
config --get-regexp '^remote\.[^.]*\.url$' | while read key value; do
newval=$(echo $value | sed
's#.*/git/pkg-go/packages/\([^/]*\.git\)/\?$#git at salsa.debian.org:go-team/packages/\1#');
test "$value" != "$newval" || continue ; remote=$(echo $key | sed
's/^remote\.\([^.]*\)\.url$/\1/'); git --git-dir=$i/.git remote set-url
$remote $newval; done; done
--
Martín Ferrari (Tincho)
More information about the Pkg-go-maintainers
mailing list