From 8693cbadcf8f4981ca595d68ddc035842dfdbcdf Mon Sep 17 00:00:00 2001 From: "reaction.la" Date: Thu, 16 Jun 2022 09:46:40 +1000 Subject: [PATCH] fixing repo configuration to better handle radical submodule changes --- .gitconfig | 5 ++++- docs/set_upstream.sh | 52 ++++++++++++++++++++++++++++++++++++++++++++ winConfigure.sh | 2 +- 3 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 docs/set_upstream.sh diff --git a/.gitconfig b/.gitconfig index 507547f..fc87133 100644 --- a/.gitconfig +++ b/.gitconfig @@ -1,6 +1,7 @@ [core] autocrlf = input whitespace = -tab-in-indent,tabwidth=4,indent-with-non-tab,trailing-space,space-before-tab + whitespace = fix safecrlf=warn [apply] whitespace = fix @@ -12,5 +13,7 @@ [commit] gpgSign = true [submodule] - recurse = true + recurse = true +[diff] + submodule = log diff --git a/docs/set_upstream.sh b/docs/set_upstream.sh new file mode 100644 index 0000000..50d1750 --- /dev/null +++ b/docs/set_upstream.sh @@ -0,0 +1,52 @@ +#!/bin/bash +set -e +set -x +echo intended to be run in the event of moving repositories +git remote -v +git remote set-url origin git@cpal.pw:~/wallet.git +git submodule foreach --recursive 'git remote -v' +cd libsodium +git remote set-url origin git@cpal.pw:~/libsodium.git +git remote set-url upstream https://github.com/jedisct1/libsodium.git +cd .. +cd mpir +git remote set-url origin git@cpal.pw:~/mpir.git +git remote set-url upstream https://github.com/BrianGladman/mpir.git +cd .. +cd wxWidgets +git remote set-url origin git@cpal.pw:~/wxWidgets.git +git remote set-url upstream https://github.com/wxWidgets/wxWidgets.git +cd .. +cd wxWidgets/3rdparty/catch +git remote set-url origin git@cpal.pw:~/Catch.git +git remote set-url upstream https://github.com/wxWidgets/Catch.git +cd ../../.. +cd wxWidgets/3rdparty/nanosvg +git remote set-url origin git@cpal.pw:~/nanosvg +git remote set-url upstream https://github.com/wxWidgets/nanosvg +cd ../../.. +cd wxWidgets/3rdparty/pcre +git remote set-url origin git@cpal.pw:~/pcre +git remote set-url upstream https://github.com/wxWidgets/pcre +cd ../../.. +cd wxWidgets/src/expat +git remote set-url origin git@cpal.pw:~/libexpat.git +git remote set-url upstream https://github.com/wxWidgets/libexpat.git +cd ../../.. +cd wxWidgets/src/jpeg +git remote set-url origin git@cpal.pw:~/libjpeg-turbo.git +git remote set-url upstream https://github.com/wxWidgets/libjpeg-turbo.git +cd ../../.. +cd wxWidgets/src/png +git remote set-url origin git@cpal.pw:~/libpng.git +git remote set-url upstream https://github.com/wxWidgets/libpng.git +cd ../../.. +cd wxWidgets/src/tiff +git remote set-url origin git@cpal.pw:~/libtiff.git +git remote set-url upstream https://github.com/wxWidgets/libtiff.git +cd ../../.. +cd wxWidgets/src/zlib +git remote set-url origin git@cpal.pw:~/zlib.git +git remote set-url upstream https://github.com/wxWidgets/zlib.git +cd ../../.. +winConfigure.sh diff --git a/winConfigure.sh b/winConfigure.sh index 01e1f5f..fb77a4d 100644 --- a/winConfigure.sh +++ b/winConfigure.sh @@ -3,7 +3,7 @@ set -e set -x git submodule foreach --recursive 'git reset --hard' git submodule foreach --recursive 'git clean -xdf' -git submodule update --init --recursive +git submodule update --init --recursive --remote git config --local include.path ../.gitconfig set +e set +x