Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite9c523d

Browse files
committed
fix(lockfile): Update withfetch/pull based on commit
Depending if there is a commit found the update command will eitherfetch or pull. It will fetch if there is a commit found else it willpull.
1 parent79f2af8 commite9c523d

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

‎lua/packer/plugin_types/git.lua‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -225,26 +225,24 @@ end
225225
localget_depth=function(plugin)
226226
ifconfig.is_lockfilethen
227227
localinfo=lockfile.get(plugin.short_name)
228-
returninfo.dateandfmt('--shallow-since="%s"',info.date)or'--depth=999999'
228+
returninfo.dateandfmt('--shallow-since="%s"',info.date)or'--depth=999999'
229229
else
230230
localdepth=plugin.commitand999999orconfig.depth
231-
returnfmt('--depth="%s"',depth)
231+
returnfmt('--depth="%s"',depth)
232232
end
233233
end
234234

235235
git.setup=function(plugin)
236+
localdepth_opt=get_depth(plugin)
236237
localplugin_name=util.get_plugin_full_name(plugin)
237238
localinstall_to=plugin.install_path
238-
localinstall_cmd=vim.split(config.exec_cmd..config.subcommands.install,'%s+')
239-
install_cmd[#install_cmd+1]=get_depth(plugin)
239+
localinstall_cmd=vim.split(config.exec_cmd..config.subcommands.install..depth_opt,'%s+')
240240

241241
localsubmodule_cmd=config.exec_cmd..config.subcommands.submodules
242242
localrev_cmd=config.exec_cmd..config.subcommands.get_rev
243243

244-
localuse_fetch=config.is_lockfileorplugin.commitorplugin.tag
245-
localupdate_subcmd=use_fetchandconfig.subcommands.fetchorconfig.subcommands.update
246-
localupdate_cmd=vim.split(config.exec_cmd..update_subcmd,'%s+')
247-
update_cmd[#update_cmd+1]=get_depth(plugin)
244+
localfetch_cmd=vim.split(config.exec_cmd..config.subcommands.fetch..depth_opt,'%s+')
245+
localpull_cmd=vim.split(config.exec_cmd..config.subcommands.update..depth_opt,'%s+')
248246

249247
localbranch_cmd=config.exec_cmd..config.subcommands.current_branch
250248
localcurrent_commit_cmd=vim.split(config.exec_cmd..config.subcommands.get_header,'%s+')
@@ -441,6 +439,8 @@ git.setup = function(plugin)
441439

442440
disp:task_update(plugin_name,'pulling updates...')
443441

442+
localcommit=plugin.commitorget_lockfile_info(plugin).commit
443+
localupdate_cmd=commitandfetch_cmdorpull_cmd
444444
r
445445
:and_then(await,jobs.run(update_cmd,update_opts))
446446
:and_then(await,jobs.run(submodule_cmd,update_opts))

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp