Skip to content

Commit c6664de

Browse files
committed
Changes GIT_AUTHOR to be settable from outside the script.
1 parent 9048a06 commit c6664de

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/git-split-file.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ declare -i g_iErrorCount=0
102102
readonly g_sBranchPrefix='split-file'
103103
readonly g_sColorDim=$(tput dim)
104104
readonly g_sColorRestore=$(tput sgr0)
105-
readonly g_sAuthor='Potherca-Bot <[email protected]>'
105+
106+
: readonly "${GIT_AUTHOR:=Potherca-Bot <potherca+bot@gmail.com>}"
106107
# ==============================================================================
107108

108109

@@ -283,7 +284,7 @@ getCurrentBranch() {
283284

284285
commit() {
285286
printStatus 'Creating commit'
286-
git commit --author="${g_sAuthor}" --message="${1}."
287+
git commit --author="${GIT_AUTHOR}" --message="${1}."
287288
}
288289

289290
createBranch() {

0 commit comments

Comments
 (0)