Skip to content

Commit

Permalink
Version 1.1.2
Browse files Browse the repository at this point in the history
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 Jan 13, 2013
1 parent bd47db5 commit ae64ac4
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions plugin/gitlog.vim
Expand Up @@ -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
Expand All @@ -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) "{{{
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 -

Expand Down

0 comments on commit ae64ac4

Please sign in to comment.