1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-28 16:02:01 +03:00

config: Add option 'git.autoRefresh' to en-/disable auto-refresh

Adds a new 'autoRefresh' option to the 'git' config section that allows user to
disable auto-refresh (defaults to on). If auto-refresh is enabled, the
refreshInterval is now checked before starting the timer to prevent crashes when
it is non-positive.

Fixes #1417
This commit is contained in:
Moritz Haase
2022-03-26 18:10:58 +01:00
committed by Jesse Duffield
parent 51baa8c17d
commit 240483953f
3 changed files with 14 additions and 2 deletions

View File

@ -73,6 +73,7 @@ git:
showGraph: 'when-maximised'
skipHookPrefix: WIP
autoFetch: true
autoRefresh: true
branchLogCmd: 'git log --graph --color=always --abbrev-commit --decorate --date=relative --pretty=medium {{branchName}} --'
allBranchesLogCmd: 'git log --graph --all --color=always --abbrev-commit --decorate --date=relative --pretty=medium'
overrideGpg: false # prevents lazygit from spawning a separate process when using GPG
@ -84,7 +85,7 @@ os:
editCommandTemplate: '{{editor}} {{filename}}'
openCommand: ''
refresher:
refreshInterval: 10 # file/submodule refresh interval in seconds
refreshInterval: 10 # File/submodule refresh interval in seconds. Auto-refresh can be disabled via option 'git.autoRefresh'.
fetchInterval: 60 # re-fetch interval in seconds
update:
method: prompt # can be: prompt | background | never