feat(gitaliases): Sniff out current user for standup

This commit is contained in:
Iristyle
2013-03-18 20:59:42 -04:00
parent 2a04044d07
commit fcdbb2d7ba
2 changed files with 10 additions and 2 deletions

View File

@@ -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~

View File

@@ -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~'