Permalink
Browse files

Version 1.1.2

Fixed broken plugin. Also fixed issue that was caused if a branch name had special chars that the "system" callout did not like stopping the log from getting the branch information.
  • Loading branch information...
Peter Antoine authored and vim-scripts committed Dec 10, 2012
1 parent bd47db5 commit ae64ac41bf43e30a84e030ffc2008d1f95596ed7
Showing with 7 additions and 7 deletions.
  1. +7 −7 plugin/gitlog.vim
View
@@ -19,7 +19,7 @@
" It is that simple.
"
" Author : peterantoine
-" version: 1.1.1
+" version: 1.1.2
" Date : 29/09/2012 14:42:03
" ---------------------------------------------------------------------------------
" Copyright (c) 2012 Peter Antoine
@@ -33,6 +33,8 @@
" 1.1.0 PA 27.10.2012 Added functionality to the Branch window.
" 1.1.1 PA 21.11.2012 Fixed issue with not finding history if the
" editor was not launched in the repository tree.
+" 1.1.2 pa 10.12.2012 Fixed broken plugin. Ordero of parameter setting
+" caused by the last fix, broke the plugin.
" }}}
" PUBLIC FUNCTIONS
" FUNCTION: GITLOG_GetHistory(filename) "{{{
@@ -46,9 +48,7 @@
" filename the filename to search for history for.
"
function! GITLOG_GetHistory(filename)
- " have to get the files that it uses first
- let s:repository_root = s:GITLOG_FindRespositoryRoot(a:filename)
-
+ " have to get the files that it uses first
if (s:repository_root == "")
return 0
else
@@ -179,10 +179,10 @@ endfunction "}}}
" nothing
"
function! GITLOG_ToggleWindows()
-
if !exists("s:gitlog_loaded")
- let s:gitlog_current_branch = GITLOG_GetBranch()
let s:revision_file = expand('%:p')
+ let s:repository_root = s:GITLOG_FindRespositoryRoot(s:revision_file)
+ let s:gitlog_current_branch = GITLOG_GetBranch()
if (GITLOG_GetHistory(s:revision_file))
let s:gitlog_loaded = 1
@@ -338,7 +338,7 @@ function! s:GITLOG_OpenLogWindow(file_name)
" rev-list does not support the --git-dir flag, so have to cd into the directory.
exec 'cd' fnameescape(s:repository_root)
redir => gitdiff_history
- silent execute "!git --git-dir=" . s:repository_root . ".git rev-list " . s:gitlog_current_branch . " --oneline --graph -- " . a:file_name
+ silent execute "!git --git-dir=" . s:repository_root . ".git rev-list " . shellescape(s:gitlog_current_branch,1) . " --oneline --graph -- " . a:file_name
redir END
cd -

0 comments on commit ae64ac4

Please sign in to comment.