-
-
Notifications
You must be signed in to change notification settings - Fork 93
Add git-whoami #82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add git-whoami #82
Conversation
bin/git-whoami
Outdated
| } | ||
|
|
||
| get_name() { | ||
| git config user.name || getent passwd $(id -un) | cut -d : -f 5 | cut -d , -f 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quote this to prevent word splitting.
bin/git-whoami
Outdated
| git config user.name || getent passwd $(id -un) | cut -d : -f 5 | cut -d , -f 1 | ||
| } | ||
|
|
||
| : ${GIT_AUTHOR_NAME=$(get_name)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Double quote to prevent globbing and word splitting.
bin/git-whoami
Outdated
| } | ||
|
|
||
| : ${GIT_AUTHOR_NAME=$(get_name)} | ||
| : ${GIT_COMMITTER_NAME=$(get_name)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Double quote to prevent globbing and word splitting.
bin/git-whoami
Outdated
|
|
||
| : ${GIT_AUTHOR_NAME=$(get_name)} | ||
| : ${GIT_COMMITTER_NAME=$(get_name)} | ||
| : ${GIT_AUTHOR_EMAIL=$(get_email)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Double quote to prevent globbing and word splitting.
bin/git-whoami
Outdated
| : ${GIT_AUTHOR_NAME=$(get_name)} | ||
| : ${GIT_COMMITTER_NAME=$(get_name)} | ||
| : ${GIT_AUTHOR_EMAIL=$(get_email)} | ||
| : ${GIT_COMMITTER_EMAIL=$(get_email)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Double quote to prevent globbing and word splitting.
| git config user.name || getent passwd "$(id -un)" | cut -d : -f 5 | cut -d , -f 1 | ||
| } | ||
|
|
||
| : ${GIT_AUTHOR_NAME="$(get_name)"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Double quote to prevent globbing and word splitting.
| } | ||
|
|
||
| : ${GIT_AUTHOR_NAME="$(get_name)"} | ||
| : ${GIT_COMMITTER_NAME="$(get_name)"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Double quote to prevent globbing and word splitting.
|
|
||
| : ${GIT_AUTHOR_NAME="$(get_name)"} | ||
| : ${GIT_COMMITTER_NAME="$(get_name)"} | ||
| : ${GIT_AUTHOR_EMAIL="$(get_email)"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Double quote to prevent globbing and word splitting.
| : ${GIT_AUTHOR_NAME="$(get_name)"} | ||
| : ${GIT_COMMITTER_NAME="$(get_name)"} | ||
| : ${GIT_AUTHOR_EMAIL="$(get_email)"} | ||
| : ${GIT_COMMITTER_EMAIL="$(get_email)"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Double quote to prevent globbing and word splitting.
|
Code Climate has analyzed commit 6dde88d and detected 4 issues on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
Description
Type of changes
Checklist:
#!/usr/bin/env interpreterinstead of potentially platform-specific direct paths (#!/bin/shis an ok exception)\License Acceptance