diff options
| author | EuAndreh <eu@euandre.org> | 2018-11-15 22:27:55 -0200 |
|---|---|---|
| committer | EuAndreh <eu@euandre.org> | 2018-11-15 22:27:55 -0200 |
| commit | f507ad5874782868b9d7a48d0f79af4be8ea3c64 (patch) | |
| tree | 8050b8ee2ecfdb811bcef54f6af6ecb8eef7c64c | |
| parent | Unsubscribe. (diff) | |
| parent | Add git-blame-someonelse script. (diff) | |
| download | dotfiles-f507ad5874782868b9d7a48d0f79af4be8ea3c64.tar.gz dotfiles-f507ad5874782868b9d7a48d0f79af4be8ea3c64.tar.xz | |
Merge branch 'master' of gitlab.com:EuAndreh/dotfiles
| -rw-r--r-- | bash/env.sh | 2 | ||||
| -rw-r--r-- | git/mrconfig.ini | bin | 10714 -> 10733 bytes | |||
| -rwxr-xr-x | scripts/git-blame-someone-else | 21 |
3 files changed, 22 insertions, 1 deletions
diff --git a/bash/env.sh b/bash/env.sh index 008aaf1b..c81cba2e 100644 --- a/bash/env.sh +++ b/bash/env.sh @@ -34,7 +34,7 @@ export PATH="$DOTFILES/scripts/:$PATH" export PATH="$DOTFILES/encrypted/scripts/:$PATH" export YT_TEMPLATE="~/Downloads/yt-dl/%(uploader)s/%(upload_date)s %(title)s.%(ext)s" export INPUTRC=~/.inputrc -export CACHE_DIR="~/Nextcloud/cache~/Nextclo" +export CACHE_DIR="~/Nextcloud/cache" diff --git a/git/mrconfig.ini b/git/mrconfig.ini Binary files differindex 51a04cd7..7d837258 100644 --- a/git/mrconfig.ini +++ b/git/mrconfig.ini diff --git a/scripts/git-blame-someone-else b/scripts/git-blame-someone-else new file mode 100755 index 00000000..dd718267 --- /dev/null +++ b/scripts/git-blame-someone-else @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +# Taken from https://github.com/jayphelps/git-blame-someone-else/ + +if [ $# -ne 2 ]; then + >&2 echo "Usage: $0 <author> <commit>" + exit 1 +fi + +AUTHOR=$1 +AUTHOR_NAME=$(echo $AUTHOR | perl -wlne '/^(.*?)\s*<.*>$/ and print $1') +AUTHOR_EMAIL=$(echo $AUTHOR | perl -wlne '/^.*\s*<(.*)>$/ and print $1') +COMMIT=$(git rev-parse --short $2) + +{ + GIT_SEQUENCE_EDITOR="sed -i -e 's/^pick $COMMIT/edit $COMMIT/'" git rebase -i $COMMIT~1^^ + GIT_COMMITTER_NAME="$AUTHOR_NAME" GIT_COMMITTER_EMAIL="$AUTHOR_EMAIL" git commit --amend --no-edit --author="$AUTHOR" + # git rebase --continue +} &> /dev/null + +echo "$AUTHOR_NAME is now the author of $COMMIT. You're officially an asshole."; |
