From d330c4c0a01d1a61d0983ab2a2eb30befb7d9858 Mon Sep 17 00:00:00 2001 From: Wolfgang Müller Date: Sun, 4 Jul 2021 13:13:27 +0200 Subject: Do not exit if package.format is unset Both git-package(1) and git-sign-for-cgit(1) set 'errexit', making the shell exit immediately upon an error. Since git-config(1) exits with an error if a configuration entry could not be found, a missing entry for package.format would lead to both scripts bailing out. We want to fall back to the "tar.gz" format if package.format is unset, so make sure to ignore this particular error. --- git-package | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git-package') diff --git a/git-package b/git-package index 4becad9..2bdfce4 100755 --- a/git-package +++ b/git-package @@ -13,7 +13,7 @@ usage() { errx 'usage: git package [-f format] tree-ish [path...]' } -format="$(git config --get package.format)" +format="$(git config --get package.format)" || true : "${format:=tar.gz}" while getopts f: opt; do -- cgit v1.2.3-2-gb3c3