Import golang/gddo at commit 20d68f94ee1f7547de2b1c68627253df20c8d45e
into daemon/server/httputils/internal/httputil.
The upstream repository was archived in 2021. Its history was filtered
to remove repository-specific CI and project files and rewritten to its
new location.
Strategy taken:
# install filter-repo (https://github.com/newren/git-filter-repo/blob/main/INSTALL.md)
brew install git-filter-repo
cd ~/projects
# create a temporary clone of gddo
git clone --single-branch --branch master --no-tags https://github.com/golang/gddo.git tmp_gddo
cd tmp_gddo
git rev-parse HEAD
20d68f94ee1f7547de2b1c68627253df20c8d45e
git filter-repo --analyze
git filter-repo \
--path httputil/negotiate.go \
--path httputil/negotiate_test.go \
--path httputil/header/header.go \
--path httputil/header/header_test.go \
--path LICENSE \
--path-rename httputil/:daemon/server/httputils/internal/httputil/ \
--path-rename LICENSE:daemon/server/httputils/internal/httputil/LICENSE \
--prune-empty always \
--prune-degenerate always
# go to the target github.com/moby/moby repository
cd ~/projects/moby
# create a branch to work with
git checkout -b import_gddo
# add the temporary repository as an upstream and make sure it's up-to-date
git remote add tmp_gddo ~/projects/tmp_gddo
git fetch --no-tags tmp_gddo master
# merge the upstream code
git merge --allow-unrelated-histories --no-ff --signoff -S tmp_gddo/master
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>