diff options
| author | Michael Forney <mforney@mforney.org> | 2016-12-11 16:04:20 -0800 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2016-12-13 23:10:30 -0800 |
| commit | 293f5a93b77d92fd65db7f3d0df654f102e46cfb (patch) | |
| tree | 6ecd1170e3dd793862dd852814dc1b4cd5e44260 /core/git/patch | |
| parent | 9a506a6834df01a26795cea222b410f206efa9fa (diff) | |
Move to flat package hierarchy
Note to self: never try to move submodules again
To migrate your existing submodules (more or less):
set -x
set -e
mkdir .git/modules/pkg
for old in */*/src ; do
new="pkg/${old#*/}"
if ! [ -f "$old/.git" ] || [ "${old%%/*}" = pkg ] ; then
continue
fi
git -C ".git/modules/$old" config core.worktree "../../../../../$new"
rmdir "$new"
mv "$old" "$new"
sed -e "s,$old,$new," "$new/.git" > "$new/.git.tmp"
mv "$new/.git.tmp" "$new/.git"
mkdir ".git/modules/${new%/src}"
mv ".git/modules/$old" ".git/modules/$new"
rm "${old%/src}"/*.ninja
mv "${old%/src}"/*.tar.{gz,xz,bz2} "${new%/src}/"
rmdir "${old%/src}" || true
done
sed -e 's,^\[submodule "[^/]*/,[submodule "pkg/,' .git/config > .git/config.tmp
mv .git/config.tmp .git/config
Diffstat (limited to 'core/git/patch')
| -rw-r--r-- | core/git/patch/0001-Drop-dashes-from-builtin-invocations-in-scripts.patch | 107 |
1 files changed, 0 insertions, 107 deletions
diff --git a/core/git/patch/0001-Drop-dashes-from-builtin-invocations-in-scripts.patch b/core/git/patch/0001-Drop-dashes-from-builtin-invocations-in-scripts.patch deleted file mode 100644 index 717f8b13..00000000 --- a/core/git/patch/0001-Drop-dashes-from-builtin-invocations-in-scripts.patch +++ /dev/null @@ -1,107 +0,0 @@ -From b8d3b9e40f00194a25797f606aeebf946b38eba2 Mon Sep 17 00:00:00 2001 -From: Michael Forney <mforney@mforney.org> -Date: Sat, 3 Dec 2016 00:41:41 -0800 -Subject: [PATCH] Drop dashes from builtin invocations in scripts - ---- - git-merge-octopus.sh | 2 +- - git-merge-one-file.sh | 8 ++++---- - git-merge-resolve.sh | 2 +- - git-parse-remote.sh | 2 +- - git-submodule.sh | 6 +++--- - 5 files changed, 10 insertions(+), 10 deletions(-) - -diff --git a/git-merge-octopus.sh b/git-merge-octopus.sh -index bcf0d92..6c390d6 100755 ---- a/git-merge-octopus.sh -+++ b/git-merge-octopus.sh -@@ -100,7 +100,7 @@ do - if test $? -ne 0 - then - gettextln "Simple merge did not work, trying automatic merge." -- git-merge-index -o git-merge-one-file -a || -+ git merge-index -o git-merge-one-file -a || - OCTOPUS_FAILURE=1 - next=$(git write-tree 2>/dev/null) - fi -diff --git a/git-merge-one-file.sh b/git-merge-one-file.sh -index 424b034..9879c59 100755 ---- a/git-merge-one-file.sh -+++ b/git-merge-one-file.sh -@@ -115,16 +115,16 @@ case "${1:-.}${2:-.}${3:-.}" in - ;; - esac - -- src1=$(git-unpack-file $2) -- src2=$(git-unpack-file $3) -+ src1=$(git unpack-file $2) -+ src2=$(git unpack-file $3) - case "$1" in - '') - echo "Added $4 in both, but differently." -- orig=$(git-unpack-file e69de29bb2d1d6434b8b29ae775ad8c2e48c5391) -+ orig=$(git unpack-file e69de29bb2d1d6434b8b29ae775ad8c2e48c5391) - ;; - *) - echo "Auto-merging $4" -- orig=$(git-unpack-file $1) -+ orig=$(git unpack-file $1) - ;; - esac - -diff --git a/git-merge-resolve.sh b/git-merge-resolve.sh -index c9da747..343fe7b 100755 ---- a/git-merge-resolve.sh -+++ b/git-merge-resolve.sh -@@ -45,7 +45,7 @@ then - exit 0 - else - echo "Simple merge failed, trying Automatic merge." -- if git-merge-index -o git-merge-one-file -a -+ if git merge-index -o git-merge-one-file -a - then - exit 0 - else -diff --git a/git-parse-remote.sh b/git-parse-remote.sh -index d3c3998..dcfa271 100644 ---- a/git-parse-remote.sh -+++ b/git-parse-remote.sh -@@ -2,7 +2,7 @@ - # upstream branch that should be pulled by "git pull" from the current - # branch. - --# git-ls-remote could be called from outside a git managed repository; -+# git ls-remote could be called from outside a git managed repository; - # this would fail in that case and would issue an error message. - GIT_DIR=$(git rev-parse -q --git-dir) || :; - -diff --git a/git-submodule.sh b/git-submodule.sh -index a024a13..4aac71f 100755 ---- a/git-submodule.sh -+++ b/git-submodule.sh -@@ -843,7 +843,7 @@ cmd_summary() { - test $status != A && test $ignore_config = all && continue - fi - # Also show added or modified modules which are checked out -- GIT_DIR="$sm_path/.git" git-rev-parse --git-dir >/dev/null 2>&1 && -+ GIT_DIR="$sm_path/.git" git rev-parse --git-dir >/dev/null 2>&1 && - printf '%s\n' "$sm_path" - done - ) -@@ -877,11 +877,11 @@ cmd_summary() { - missing_dst= - - test $mod_src = 160000 && -- ! GIT_DIR="$name/.git" git-rev-parse -q --verify $sha1_src^0 >/dev/null && -+ ! GIT_DIR="$name/.git" git rev-parse -q --verify $sha1_src^0 >/dev/null && - missing_src=t - - test $mod_dst = 160000 && -- ! GIT_DIR="$name/.git" git-rev-parse -q --verify $sha1_dst^0 >/dev/null && -+ ! GIT_DIR="$name/.git" git rev-parse -q --verify $sha1_dst^0 >/dev/null && - missing_dst=t - - display_name=$(git submodule--helper relative-path "$name" "$wt_prefix") --- -2.10.2 - |
