Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F12297936
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/_utils/repo/export-commits-to-manyrepo.sh b/_utils/repo/export-commits-to-manyrepo.sh
new file mode 100755
index 0000000..cbeedc8
--- /dev/null
+++ b/_utils/repo/export-commits-to-manyrepo.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+set -e
+
+# Parses arguments
+if [ $# -lt 1 ]; then
+ echo "Usage: $0 <TARGET REPOSITORY>" 1>&2
+ exit 1
+fi
+REPO=$1
+
+set -x
+
+# Prepares new main branch for $REPO
+git subtree split -P "$REPO" -b "$REPO"
+
+# Merge new subtree split branch into main
+git rebase --strategy-option=ours "$REPO" "$REPO"/main
+
+# Push new main
+git push "$REPO" "$REPO"/main:main
+
+# Cleans up
+git checkout main
+git branch -D "$REPO"
diff --git a/_utils/repo/export-commits-to-manyrepos.sh b/_utils/repo/export-commits-to-manyrepos.sh
new file mode 100755
index 0000000..6c1fc19
--- /dev/null
+++ b/_utils/repo/export-commits-to-manyrepos.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+_utils/get-repos-modified-by-last-commit.sh | xargs -n 1 _utils/export-commits-to-manyrepo.sh
diff --git a/_utils/repo/get-repos-modified-by-last-commit.sh b/_utils/repo/get-repos-modified-by-last-commit.sh
new file mode 100755
index 0000000..c86b6bf
--- /dev/null
+++ b/_utils/repo/get-repos-modified-by-last-commit.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+git diff-tree --no-commit-id --name-only -r HEAD | grep -v -e '_.*' | cut -f1 -d"/" | sort | uniq
diff --git a/_utils/repo/import-commits-from-polyrepos.sh b/_utils/repo/import-commits-from-polyrepos.sh
new file mode 100755
index 0000000..39b5438
--- /dev/null
+++ b/_utils/repo/import-commits-from-polyrepos.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+_utils/list-repos.sh | xargs -I '{}' -n 1 git merge --strategy recursive --strategy-option subtree={}/ {}/main
diff --git a/_utils/repo/list-repos.sh b/_utils/repo/list-repos.sh
new file mode 100755
index 0000000..fa4d708
--- /dev/null
+++ b/_utils/repo/list-repos.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+git remote -v | awk '{print $1}' | grep -v origin | sort | uniq
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Wed, Oct 22, 13:44 (15 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3092272
Default Alt Text
(1 KB)
Attached To
Mode
rKERUALD Keruald libraries development repository
Attached
Detach File
Event Timeline
Log In to Comment