Last active
September 4, 2018 07:36
-
-
Save osa1/626e0dda076378a55a8ef4b06d28108a to your computer and use it in GitHub Desktop.
Show commit hash in when viewing a commit in fugitive
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
diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim | |
index 1cc3d44..4a99b06 100644 | |
--- a/autoload/fugitive.vim | |
+++ b/autoload/fugitive.vim | |
@@ -1524,7 +1524,7 @@ function! fugitive#BufReadCmd(...) abort | |
if b:fugitive_display_format | |
call s:ReplaceCmd([dir, 'cat-file', b:fugitive_type, rev]) | |
else | |
- call s:ReplaceCmd([dir, 'show', '--no-color', '--pretty=format:tree%x20%T%nparent%x20%P%nauthor%x20%an%x20<%ae>%x20%ad%ncommitter%x20%cn%x20<%ce>%x20%cd%nencoding%x20%e%n%n%s%n%n%b', rev]) | |
+ call s:ReplaceCmd([dir, 'show', '--no-color', '--pretty=format:commit%x20%H%ntree%x20%T%nparent%x20%P%nauthor%x20%an%x20<%ae>%x20%ad%ncommitter%x20%cn%x20<%ce>%x20%cd%nencoding%x20%e%n%n%s%n%n%b', rev]) | |
keepjumps call search('^parent ') | |
if getline('.') ==# 'parent ' | |
silent keepjumps delete_ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment