Date: Thu, 25 Mar 2021 12:07:53 GMT From: Alex Richardson <arichardson@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 142cb88bc68d - main - git-arc.sh: Make it compatible with Ubuntu 18.04 Message-ID: <202103251207.12PC7rhi018872@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=142cb88bc68d59e1993dc3364a673ae01cf6899b commit 142cb88bc68d59e1993dc3364a673ae01cf6899b Author: Alex Richardson <arichardson@FreeBSD.org> AuthorDate: 2021-03-25 11:17:56 +0000 Commit: Alex Richardson <arichardson@FreeBSD.org> CommitDate: 2021-03-25 11:17:58 +0000 git-arc.sh: Make it compatible with Ubuntu 18.04 dash does not allow function names containing a ":", so replace it with a '_'. Additionally, Ubunutu 18.04 ships git 2.17 which does not support the `--default false` flag for git config. Reviewed By: markj Differential Revision: https://reviews.freebsd.org/D29374 --- tools/tools/git/git-arc.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tools/tools/git/git-arc.sh b/tools/tools/git/git-arc.sh index 53bf462eff18..82a549e0868f 100644 --- a/tools/tools/git/git-arc.sh +++ b/tools/tools/git/git-arc.sh @@ -350,12 +350,12 @@ build_commit_list() echo "$commits" } -gitarc::create() +gitarc__create() { local commit commits doprompt list o prev reviewers subscribers list= - if [ "$(git config --bool --default false --get arc.list)" != "false" ]; then + if [ "$(git config --bool --get arc.list 2>/dev/null || echo false)" != "false" ]; then list=1 fi doprompt=1 @@ -402,7 +402,7 @@ gitarc::create() restore_head } -gitarc::list() +gitarc__list() { local chash commit commits diff title @@ -435,7 +435,7 @@ gitarc::list() done } -gitarc::patch() +gitarc__patch() { local rev @@ -450,7 +450,7 @@ gitarc::patch() done } -gitarc::stage() +gitarc__stage() { local author branch commit commits diff reviewers tmp @@ -498,7 +498,7 @@ gitarc::stage() done } -gitarc::update() +gitarc__update() { local commit commits diff @@ -524,7 +524,7 @@ gitarc::update() set -e ASSUME_YES= -if [ "$(git config --bool --default false --get arc.assume-yes)" != "false" ]; then +if [ "$(git config --bool --get arc.assume-yes 2>/dev/null || echo false)" != "false" ]; then ASSUME_YES=1 fi @@ -588,10 +588,10 @@ list|patch) ;; esac -if [ "$(git config --bool --default false --get arc.browse)" != "false" ]; then +if [ "$(git config --bool --get arc.browse 2>/dev/null || echo false)" != "false" ]; then BROWSE=--browse fi trap restore_head EXIT INT -gitarc::"${verb}" "$@" +gitarc__"${verb}" "$@"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202103251207.12PC7rhi018872>