Repository: jayphelps/git-blame-someone-else Branch: master Commit: 8d854c2d78cb Files: 4 Total size: 2.9 KB Directory structure: gitextract_po9winy6/ ├── LICENSE ├── Makefile ├── README.md └── git-blame-someone-else ================================================ FILE CONTENTS ================================================ ================================================ FILE: LICENSE ================================================ The MIT License (MIT) Copyright (c) 2016 Jay Phelps Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: Makefile ================================================ prefix=/usr/local # files that need mode 755 EXEC_FILES =git-blame-someone-else all: @echo "usage: make install" @echo " make uninstall" install: install -m 0755 $(EXEC_FILES) $(prefix)/bin uninstall: test -d $(prefix)/bin && \ cd $(prefix)/bin && \ rm -f $(EXEC_FILES) ================================================ FILE: README.md ================================================ # git-blame-someone-else > "I love git-blame-someone-else!!" -[Linus Torvalds says](https://github.com/jayphelps/git-blame-someone-else/commit/e5cfe4bb2190a2ae406d5f0b8f49c32ac0f01cd7)* ## Install ```bash $ git clone https://github.com/jayphelps/git-blame-someone-else.git $ cd git-blame-someone-else $ sudo make install ``` ## Usage ```bash $ git blame-someone-else ``` ![ezgif-1396449034](https://cloud.githubusercontent.com/assets/762949/12863650/068e2820-cc2e-11e5-80c5-6ebdb71f51ea.gif) ## Disclaimer: This changes not only who authored the commit but the listed commiter as well. It also is something I wrote as a joke, so please don't run this against your production repo and complain if this script deletes everything. *Linus Torvalds didn't really approve of this. It's a joke to prove it works. [See his fake commit here](https://github.com/jayphelps/git-blame-someone-else/commit/e5cfe4bb2190a2ae406d5f0b8f49c32ac0f01cd7) :shipit: ================================================ FILE: git-blame-someone-else ================================================ #!/usr/bin/env bash if [ $# -ne 2 ]; then >&2 echo "Usage: $0 " 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.";