Skip to content

Commit a9b46e4

Browse files
committed
suchwow
0 parents  commit a9b46e4

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed

Makefile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
prefix=/usr/local
2+
3+
# files that need mode 755
4+
EXEC_FILES =git-blame-someone-else
5+
6+
all:
7+
@echo "usage: make install"
8+
@echo " make uninstall"
9+
10+
install:
11+
install -m 0755 $(EXEC_FILES) $(prefix)/bin
12+
13+
uninstall:
14+
test -d $(prefix)/bin && \
15+
cd $(prefix)/bin && \
16+
rm -f $(EXEC_FILES)

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# git-blame-someone-else
2+
3+
## Usage
4+
5+
```bash
6+
$ git blame-someone-else <author> <commit>
7+
```

git-blame-someone-else

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env bash
2+
3+
AUTHOR=$1
4+
COMMIT=$(git rev-parse --short $2)
5+
6+
{
7+
GIT_SEQUENCE_EDITOR="sed -i -e 's/^pick $COMMIT/edit $COMMIT/'" git rebase -i $COMMIT~1^^
8+
git commit --amend --no-edit --author="$AUTHOR"
9+
git rebase --continue
10+
} &> /dev/null
11+
12+
echo "$AUTHOR is now the author of $COMMIT. You're officially an asshole.";

0 commit comments

Comments
 (0)