diff options
Diffstat (limited to '')
-rwxr-xr-x | git/bin/git-whoami | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/git/bin/git-whoami b/git/bin/git-whoami index bf1645d..954a5ba 100755 --- a/git/bin/git-whoami +++ b/git/bin/git-whoami @@ -17,10 +17,10 @@ get_name() { git config user.name || getent passwd "$(id -un)" | cut -d : -f 5 | cut -d , -f 1 } -: ${GIT_AUTHOR_NAME=$(get_name)} -: ${GIT_COMMITTER_NAME=$(get_name)} -: ${GIT_AUTHOR_EMAIL=$(get_email)} -: ${GIT_COMMITTER_EMAIL=$(get_email)} +GIT_AUTHOR_NAME="${GIT_AUTHOR_NAME:-$(get_name)}" +GIT_AUTHOR_EMAIL="${GIT_AUTHOR_EMAIL:-$(get_email)}" +GIT_COMMITTER_NAME="${GIT_COMMITER_NAME:-$(get_name)}" +GIT_COMMITTER_EMAIL="${GIT_COMMITER_EMAIL:-$(get_email)}" author="$GIT_AUTHOR_NAME <$GIT_AUTHOR_EMAIL>" commit="$GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>" |