Permalink
Browse files

Version 2.0.1: Incorrect version released - now releasing the correct…

… one.
  • Loading branch information...
1 parent e64af47 commit 27e52108c372c9e96f377651a2707e6c08e82da1 Peter Antoine committed with Apr 26, 2013
Showing with 6 additions and 8 deletions.
  1. +6 −8 plugin/gitlog.vim
View
@@ -88,23 +88,21 @@ function! GITLOG_GetHistory(filename)
if (s:repository_root == "")
return 0
else
+ let s:revision_path = substitute(a:filename,s:repository_root,"","")
+ let s:original_window = bufwinnr("%")
+
if (a:filename == "")
- echohl WarningMsg
- echomsg "No file in the buffer, can't get history"
- echohl Normal
- return 0
+ return s:GITLOG_OpenTreeWindow()
else
- let s:revision_path = substitute(a:filename,s:repository_root,"","")
- let s:original_window = bufwinnr("%")
-
"TODO: check for valid version should be here
silent execute "!git --git-dir=" . s:repository_root . ".git cat-file -e " . "HEAD:" . s:revision_path
if v:shell_error
+ let result = s:GITLOG_OpenTreeWindow()
echohl WarningMsg
echomsg "File " . s:gitlog_current_branch . ":" . s:revision_path . " is not tracked (test:" . a:filename . ")"
echohl Normal
- return 0
+ return result
else
call s:GITLOG_OpenLogWindow(a:filename)
call s:GITLOG_OpenBranchWindow()

0 comments on commit 27e5210

Please sign in to comment.