Created
May 23, 2017 07:57
-
-
Save ArthurSonzogni/899418ad7a3361fbe224d31e393c6bd4 to your computer and use it in GitHub Desktop.
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/bash | |
# +---------------------------------------+ | |
# | Open commit's files as buffers in vim | | |
# +---------------------------------------+ | |
if [ -z $1 ] | |
then | |
# No argument provided => use the latest commit's files. | |
commit=HEAD | |
else | |
commit=$1 | |
fi; | |
files=$(git diff-tree --no-commit-id --name-only -r $commit) | |
vim ${files} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment