From 7b8939ea3eeb29ebdc88c43a231931030759d6b7 Mon Sep 17 00:00:00 2001 From: Jonas Bernoulli Date: Thu, 1 Dec 2016 16:11:38 +0100 Subject: [PATCH] Update borg to v0.2.0-26-g2142794 Also update the "bin/borg-bootstrap" script to take the ".hive-maint" file into account as described in the Borg manual, and remove the commentary because that is now covered in the Borg manual also. --- .gitignore | 1 + bin/borg-bootstrap | 41 ++++++++--------------------------------- lib/borg | 2 +- 3 files changed, 10 insertions(+), 34 deletions(-) diff --git a/.gitignore b/.gitignore index c4c53c8..f139572 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ +/.hive-maint /var diff --git a/bin/borg-bootstrap b/bin/borg-bootstrap index 9efba12..84d89dc 100755 --- a/bin/borg-bootstrap +++ b/bin/borg-bootstrap @@ -5,37 +5,6 @@ # Author: Jonas Bernoulli # License: GPL v3 -# 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) push_remote=$(git config -f .gitmodules borg.pushDefault) @@ -79,8 +48,14 @@ do cd "$path" if test "$remote" = "$hive_remote" then - git config branch.master.remote "$remote" - + 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" + fi elif test "$remote" = "$push_remote" then git config remote.pushDefault "$remote" diff --git a/lib/borg b/lib/borg index a05b9bf..2142794 160000 --- a/lib/borg +++ b/lib/borg @@ -1 +1 @@ -Subproject commit a05b9bfdcdcfa5493a3e390afa2fde30cef421b4 +Subproject commit 21427948db4839ea5ecb74f6421a36a9ab1f5f9b