Skip to content

Commit

Permalink
Fetch all tags if there is tag spec.
Browse files Browse the repository at this point in the history
Ref #719.
  • Loading branch information
autozimu committed Jan 6, 2018
1 parent 96375cb commit c48a4de
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plug.vim
Original file line number Diff line number Diff line change
Expand Up @@ -1329,6 +1329,7 @@ while 1 " Without TCO, Vim stack is bound to explode
if empty(error)
if pull
let fetch_opt = (has_tag && !empty(globpath(spec.dir, '.git/shallow'))) ? '--depth 99999999' : ''
let fetch_opt .= has_tag ? ' --tags' : ''
call s:spawn(name, printf('git fetch %s %s 2>&1', fetch_opt, prog), { 'dir': spec.dir })
else
let s:jobs[name] = { 'running': 0, 'lines': ['Already installed'], 'error': 0 }
Expand Down Expand Up @@ -1636,6 +1637,7 @@ class Plugin(object):
self.write(Action.UPDATE, self.name, ['Updating ...'])
callback = functools.partial(self.write, Action.UPDATE, self.name)
fetch_opt = '--depth 99999999' if self.tag and os.path.isfile(os.path.join(self.args['dir'], '.git/shallow')) else ''
fetch_opt += self.tag ? ' --tags' : ''
cmd = 'git fetch {0} {1} 2>&1'.format(fetch_opt, G_PROGRESS)
com = Command(cmd, self.args['dir'], G_TIMEOUT, callback)
result = com.execute(G_RETRIES)
Expand Down Expand Up @@ -1944,6 +1946,7 @@ function! s:update_ruby()
if pull
log.call name, 'Updating ...', :update
fetch_opt = (tag && File.exist?(File.join(dir, '.git/shallow'))) ? '--depth 99999999' : ''
fetch_opt += tag ? ' --tags' : ''
bt.call "#{chdir} && git fetch #{fetch_opt} #{progress} 2>&1", name, :update, nil
else
[true, skip]
Expand Down

0 comments on commit c48a4de

Please sign in to comment.