Skip to content

Commit

Permalink
Alert user about ssh-agent when using git idm use
Browse files Browse the repository at this point in the history
  • Loading branch information
samrocketman committed Jun 8, 2018
1 parent 0908849 commit 4131834
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# git-idm v0.5

New features:

- Warn user about private key not being added to `ssh-agent` when using the `git
idm use` command.

# git-idm v0.4

Bugfixes:
Expand Down
4 changes: 3 additions & 1 deletion git-idm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#License: MIT
#Project URL: https://github.com/samrocketman/git-identity-manager

version='0.4'
version='0.5'

function echo_version() {
echo "git idm v${version}" >&2
Expand Down Expand Up @@ -258,6 +258,7 @@ case "${comm}" in
NAME="$(git config --global --get gitidm."${id}".name)"
EMAIL="$(git config --global --get gitidm."${id}".email)"
SSH_COMMAND="$(git config --global --get gitidm."${id}".sshCommand)"
SSH_KEY="$(git config --global --get gitidm."${id}".sshKey)"
if [ -n "${NAME}" ]; then
run_command git config --global user.name "${NAME}"
fi
Expand All @@ -268,6 +269,7 @@ case "${comm}" in
run_command git config --global core.sshCommand "${SSH_COMMAND}"
fi
run_command git config --global user.activeidm "${id}"
check_ssh_agent "${SSH_KEY}"
;;
version)
echo_version
Expand Down

0 comments on commit 4131834

Please sign in to comment.