]> infiniteadaptability.org Git - git-extra/commitdiff
fix: EDITOR not correctly being extracted from env master v1.0.4
authoralex <[email protected]>
Fri, 24 Mar 2023 04:58:48 +0000 (21:58 -0700)
committeralex <[email protected]>
Tue, 12 Aug 2025 18:58:53 +0000 (11:58 -0700)
Renamed multiple overwritable variables to be prefixed by GIT_EXTRA_*

README [moved from README.md with 100% similarity]
git-extra
manifest.scm [new file with mode: 0644]

similarity index 100%
rename from README.md
rename to README
index adb3e960d2f2a2d7c056d13958620ce0b76c5e0a..90c1c9f401e59de99903fdd2f9452a875ff3c49d 100644 (file)
--- 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 (file)
index 0000000..ca1ff2e
--- /dev/null
@@ -0,0 +1,6 @@
+(specifications->manifest (list "bash"
+                                "coreutils"
+                                "debianutils"
+                                "grep"
+                                "make"
+                                "shellcheck"))