Skip to content

Conversation

@unixorn
Copy link
Owner

@unixorn unixorn commented Jun 30, 2018

Description

Type of changes

  • A helper script
  • A link to an external resource like a blog post or video
  • Text cleanups/updates

Checklist:

  • All new and existing tests pass.
  • Any scripts added use #!/usr/bin/env interpreter instead of potentially platform-specific direct paths (#!/bin/sh is an ok exception)\
  • Scripts are marked executable
  • I have added a credit line to README.md for the script
  • If there was no author credit in a script added in this PR, I have added one.
  • I have confirmed that the link(s) in my PR are valid.
  • I have read the CONTRIBUTING document.

License Acceptance

  • This repository is Apache version 2.0 licensed (some scripts may have alternate licensing inline in their code) and by making this PR, I am contributing my changes to the repository under the terms of the Apache 2 license.

bin/git-whoami Outdated
}

get_name() {
git config user.name || getent passwd $(id -un) | cut -d : -f 5 | cut -d , -f 1

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)}

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)}

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)}

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)}

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)"}

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)"}

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)"}

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)"}

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.

@qlty-cloud-legacy
Copy link

Code Climate has analyzed commit 6dde88d and detected 4 issues on this pull request.

Here's the issue category breakdown:

Category Count
Bug Risk 4

View more on Code Climate.

@unixorn unixorn merged commit 1c57ac5 into master Jul 1, 2018
@unixorn unixorn deleted the add-git-whoami branch July 1, 2018 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants