diff --git a/EthanBrown.GitAliases/EthanBrown.GitAliases.nuspec b/EthanBrown.GitAliases/EthanBrown.GitAliases.nuspec index 3ecbe19..5d6a467 100644 --- a/EthanBrown.GitAliases/EthanBrown.GitAliases.nuspec +++ b/EthanBrown.GitAliases/EthanBrown.GitAliases.nuspec @@ -18,7 +18,7 @@ last = log -p --max-count=1 --word-diff pick = add -p stage = add - standup = log --since yesterday --oneline --author Iristyle + standup = log --since yesterday --oneline --author {ME} stats = diff --stat sync = ! git fetch upstream -v && git fetch origin -v && git checkout master && git merge upstream/master undo = reset head~ diff --git a/EthanBrown.GitAliases/tools/chocolateyInstall.ps1 b/EthanBrown.GitAliases/tools/chocolateyInstall.ps1 index b0716e6..f30d1c6 100644 --- a/EthanBrown.GitAliases/tools/chocolateyInstall.ps1 +++ b/EthanBrown.GitAliases/tools/chocolateyInstall.ps1 @@ -15,7 +15,15 @@ try { git config --global alias.last 'log -p --max-count=1 --word-diff' git config --global alias.pick 'add -p' git config --global alias.stage 'add' - git config --global alias.standup 'log --since yesterday --oneline --author Iristyle' + $userName = git config --global --get user.name + if ($userName) + { + git config --global alias.standup "log --since yesterday --oneline --author $userName" + } + else + { + Write-Warning "Set git global username with git config --global user.name 'foo' to use standup" + } git config --global alias.stats 'diff --stat' git config --global alias.sync '! git fetch upstream -v && git fetch origin -v && git checkout master && git merge upstream/master' git config --global alias.undo 'reset head~'