mirror of
https://github.com/emacscollective/emacs.g.git
synced 2025-06-07 08:14:16 -04:00
Merge branch 'master' into magit-directors-cut
This commit is contained in:
commit
95ebb7abda
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"
|
||||||
git config branch.master.remote "$remote"
|
|
||||||
|
|
||||||
elif test "$remote" = "$push_remote"
|
|
||||||
then
|
then
|
||||||
git config remote.pushDefault "$remote"
|
git config remote.pushDefault "$remote"
|
||||||
|
else
|
||||||
|
branch=$(git rev-parse --abbref-ref HEAD)
|
||||||
|
test -n "$branch" &&
|
||||||
|
git config branch.master.remote "$remote"
|
||||||
fi
|
fi
|
||||||
)
|
elif test "$remote" = "$push_remote"
|
||||||
|
then
|
||||||
|
git config remote.pushDefault "$remote"
|
||||||
|
fi
|
||||||
|
cd "$toplevel"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if test -e "$path"/.git
|
if test -e "$path"/.git
|
||||||
then
|
then
|
||||||
(
|
cd "$path"
|
||||||
cd "$path"
|
if ! git reset --hard "$sha1"
|
||||||
git reset --hard "$sha1" ||
|
then
|
||||||
echo >&2 "futile: checkout of '$sha1' into submodule path '$path' failed"
|
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
@ -1 +1 @@
|
|||||||
Subproject commit a05b9bfdcdcfa5493a3e390afa2fde30cef421b4
|
Subproject commit 21427948db4839ea5ecb74f6421a36a9ab1f5f9b
|
2
lib/epkg
2
lib/epkg
@ -1 +1 @@
|
|||||||
Subproject commit c11c370c3b0c50d531f2ef582788f7d139f727df
|
Subproject commit fafc14085d8890df4d2b56f76a2238d5fdc633f6
|
@ -1 +1 @@
|
|||||||
Subproject commit ab73c028e8dbe088d7545406efc5c5c7b8fd503a
|
Subproject commit 8fa5cefc1c339101d9107fbb2f302ea649b352e6
|
Loading…
x
Reference in New Issue
Block a user