This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 1) Use http://defunkt.io/dotjs/ | |
* 2) Install this into ~/.js/github.com.js | |
* 3) Click on a line number in the editor to open the file at this position (e.g. to see more context) | |
* 4) Alt+Click on a line number in the editor to edit the file at this position | |
* | |
* This script is based on @agnoster's idea: https://gist.github.com/3906361 | |
*/ | |
function getBranch() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Pre-commit hook for git which removes trailing whitespace, converts tabs to spaces, and enforces a max line length. | |
# The script does not process files that are partially staged. Reason: The `git add` in the last line would fully | |
# stage a file which is not what the user wants. | |
if git rev-parse --verify HEAD >/dev/null 2>&1 ; then | |
against=HEAD | |
else | |
# Initial commit: diff against an empty tree object | |
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904 |