From 3c384f024d714918c5285e578afde313215d1e45 Mon Sep 17 00:00:00 2001 From: alex Date: Thu, 23 Mar 2023 21:58:48 -0700 Subject: [PATCH] fix: EDITOR not correctly being extracted from env Renamed multiple overwritable variables to be prefixed by GIT_EXTRA_* --- README.md => README | 0 git-extra | 10 +++++----- manifest.scm | 6 ++++++ 3 files changed, 11 insertions(+), 5 deletions(-) rename README.md => README (100%) create mode 100644 manifest.scm diff --git a/README.md b/README similarity index 100% rename from README.md rename to README diff --git a/git-extra b/git-extra index adb3e96..90c1c9f 100644 --- a/git-extra +++ b/git-extra @@ -4,10 +4,10 @@ set -euo pipefail # Option variables LOG_LEVEL=default -BRANCH=extra -EDITOR= -MESSAGE= -TEMPLATE= +BRANCH=${GIT_EXTRA_BRANCH:-extra} +EDITOR=${EDITOR:-} +MESSAGE=${GIT_EXTRA_MESSAGE:-updated using git-extra} +TEMPLATE=${GIT_EXTRA_TEMPLATE:-} # helper variables LONG_OUTPUT=false @@ -192,7 +192,7 @@ add_to_index() { git update-index --add --cacheinfo 100644 "$hash" "$2" tree_hash=$(git write-tree) - commit_hash=$(git commit-tree -m "${MESSAGE:-updated using git-extra}" -p "$PREV_COMMIT" "$tree_hash") + commit_hash=$(git commit-tree -m "$MESSAGE" -p "$PREV_COMMIT" "$tree_hash") git update-ref "refs/heads/$BRANCH" "$commit_hash" diff --git a/manifest.scm b/manifest.scm new file mode 100644 index 0000000..ca1ff2e --- /dev/null +++ b/manifest.scm @@ -0,0 +1,6 @@ +(specifications->manifest (list "bash" + "coreutils" + "debianutils" + "grep" + "make" + "shellcheck")) -- 2.39.5