mirror of
https://github.com/emacscollective/emacs.g.git
synced 2025-11-23 11:41:18 -05:00
Merge branch 'master' into magit-directors-cut
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1 +1,2 @@
|
|||||||
|
/.hive-maint
|
||||||
/var
|
/var
|
||||||
|
|||||||
17
Makefile
17
Makefile
@@ -14,11 +14,11 @@ all: build
|
|||||||
|
|
||||||
help:
|
help:
|
||||||
$(info )
|
$(info )
|
||||||
$(info make [all|build] = rebuild all drones and init.el)
|
$(info make [all|build] = rebuild all drones and init files)
|
||||||
$(info make quick = rebuild most drones and init.el)
|
$(info make quick = rebuild most drones and init files)
|
||||||
$(info make lib/DRONE = rebuild DRONE)
|
$(info make lib/DRONE = rebuild DRONE)
|
||||||
$(info make build-init = rebuild init.el)
|
$(info make build-init = rebuild init files)
|
||||||
$(info make bootstrap = bootstrap collective)
|
$(info make bootstrap = bootstrap collective or new drones)
|
||||||
@printf "\n"
|
@printf "\n"
|
||||||
|
|
||||||
build:
|
build:
|
||||||
@@ -45,6 +45,9 @@ lib/%: .FORCE
|
|||||||
--eval '(borg-build "$(@F)")' $(SUPPRESS_WARNINGS)
|
--eval '(borg-build "$(@F)")' $(SUPPRESS_WARNINGS)
|
||||||
|
|
||||||
bootstrap:
|
bootstrap:
|
||||||
git submodule init
|
@printf "\n=== Running 'git submodule init' ===\n\n"
|
||||||
bin/borg-bootstrap
|
@git submodule init
|
||||||
make build
|
@printf "\n=== Running 'bin/borg-bootstrap' ===\n"
|
||||||
|
@bin/borg-bootstrap
|
||||||
|
@printf "\n=== Running 'make build' ===\n\n"
|
||||||
|
@make build
|
||||||
|
|||||||
@@ -5,49 +5,26 @@
|
|||||||
# Author: Jonas Bernoulli <jonas@bernoul.li>
|
# Author: Jonas Bernoulli <jonas@bernoul.li>
|
||||||
# License: GPL v3 <https://www.gnu.org/licenses/gpl-3.0.txt>
|
# License: GPL v3 <https://www.gnu.org/licenses/gpl-3.0.txt>
|
||||||
|
|
||||||
# Commentary:
|
|
||||||
|
|
||||||
# This script is a replacement for `git submodule update'. The
|
|
||||||
# main differences are that this script resets the current branch
|
|
||||||
# if necessary instead of detaching HEAD and that it is capable of
|
|
||||||
# adding and configuring additional remotes.
|
|
||||||
|
|
||||||
# The following variables can be set in ".gitmodules":
|
|
||||||
#
|
|
||||||
# * submodule.DRONE.remote = NAME URL
|
|
||||||
#
|
|
||||||
# This variable specifies an additional remote named DRONE that is
|
|
||||||
# fetched from URL.
|
|
||||||
#
|
|
||||||
# * borg.collective = REMOTE
|
|
||||||
#
|
|
||||||
# This variable specifies the name used for remotes that reference
|
|
||||||
# a repository that has been patched by the collective. If a NAME
|
|
||||||
# matches REMOTE, then it is configured as the upstream of the
|
|
||||||
# current branch of the respective DRONE.
|
|
||||||
#
|
|
||||||
# * borg.pushDefault = DEFAULT
|
|
||||||
#
|
|
||||||
# This variable specifies a name used for push-remotes. If a NAME
|
|
||||||
# matches DEFAULT, then it is configured as the push-remote of the
|
|
||||||
# current branch of the respective DRONE.
|
|
||||||
|
|
||||||
# If an error occurs while `make bootstrap' runs this script, then
|
|
||||||
# fix the error(s) and run `bin/borg-bootstrap' directly, followed
|
|
||||||
# by `make build'.
|
|
||||||
|
|
||||||
hive_remote=$(git config -f .gitmodules borg.collective)
|
hive_remote=$(git config -f .gitmodules borg.collective)
|
||||||
push_remote=$(git config -f .gitmodules borg.pushDefault)
|
push_remote=$(git config -f .gitmodules borg.pushDefault)
|
||||||
|
|
||||||
|
toplevel=$(git rev-parse --show-toplevel)
|
||||||
|
test -n "$toplevel" || exit 2
|
||||||
|
cd "$toplevel"
|
||||||
|
|
||||||
git submodule--helper list |
|
git submodule--helper list |
|
||||||
while read mode sha1 stage path
|
while read mode sha1 stage path
|
||||||
do
|
do
|
||||||
name=$(git submodule--helper name "$path")
|
|
||||||
url=$(git config -f .gitmodules submodule."$name".url)
|
|
||||||
|
|
||||||
if test -e "$path" && ! test -e "$path"/.git
|
if test -e "$path" && ! test -e "$path"/.git
|
||||||
then
|
then
|
||||||
git submodule--helper clone --name "$name" --path "$path" --url "$url"
|
name=$(git submodule--helper name "$path")
|
||||||
|
|
||||||
|
echo "\n--- [$name] ---\n"
|
||||||
|
|
||||||
|
git submodule--helper clone \
|
||||||
|
--name "$name" \
|
||||||
|
--path "$path" \
|
||||||
|
--url $(git config -f .gitmodules submodule."$name".url)
|
||||||
|
|
||||||
git config -f .gitmodules --get-all submodule."$name".remote |
|
git config -f .gitmodules --get-all submodule."$name".remote |
|
||||||
while read remote remote_url
|
while read remote remote_url
|
||||||
@@ -60,38 +37,46 @@ do
|
|||||||
--url "$remote_url" &&
|
--url "$remote_url" &&
|
||||||
git remote rename origin "$remote"
|
git remote rename origin "$remote"
|
||||||
else
|
else
|
||||||
(
|
|
||||||
cd "$path"
|
cd "$path"
|
||||||
git remote add "$remote" "$remote_url"
|
git remote add "$remote" "$remote_url"
|
||||||
git fetch "$remote"
|
git fetch "$remote"
|
||||||
)
|
cd "$toplevel"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test -e "$path"/.git
|
if test -e "$path"/.git
|
||||||
then
|
then
|
||||||
(
|
|
||||||
cd "$path"
|
cd "$path"
|
||||||
if test "$remote" = "$hive_remote"
|
if test "$remote" = "$hive_remote"
|
||||||
then
|
then
|
||||||
|
if test -e "$toplevel/.hive-maint"
|
||||||
|
then
|
||||||
|
git config remote.pushDefault "$remote"
|
||||||
|
else
|
||||||
|
branch=$(git rev-parse --abbref-ref HEAD)
|
||||||
|
test -n "$branch" &&
|
||||||
git config branch.master.remote "$remote"
|
git config branch.master.remote "$remote"
|
||||||
|
fi
|
||||||
elif test "$remote" = "$push_remote"
|
elif test "$remote" = "$push_remote"
|
||||||
then
|
then
|
||||||
git config remote.pushDefault "$remote"
|
git config remote.pushDefault "$remote"
|
||||||
fi
|
fi
|
||||||
)
|
cd "$toplevel"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if test -e "$path"/.git
|
if test -e "$path"/.git
|
||||||
then
|
then
|
||||||
(
|
|
||||||
cd "$path"
|
cd "$path"
|
||||||
git reset --hard "$sha1" ||
|
if ! git reset --hard "$sha1"
|
||||||
echo >&2 "futile: checkout of '$sha1' into submodule path '$path' failed"
|
then
|
||||||
)
|
echo >&2 "futile: Checkout of '$sha1' into submodule path '$path' failed"
|
||||||
|
git reset --hard HEAD
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
cd "$toplevel"
|
||||||
else
|
else
|
||||||
echo >&2 "futile: clone of any remote into submodule path '$path' failed"
|
echo >&2 "futile: Clone of any remote into submodule path '$path' failed"
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|||||||
2
lib/borg
2
lib/borg
Submodule lib/borg updated: a05b9bfdcd...21427948db
2
lib/epkg
2
lib/epkg
Submodule lib/epkg updated: c11c370c3b...fafc14085d
Submodule lib/with-editor updated: ab73c028e8...8fa5cefc1c
Reference in New Issue
Block a user