
On Tue, Mar 02, 2021 at 09:25:37AM +0800, Luan Shengde wrote:
On Mon, Mar 01, 2021 at 08:18:25PM +0800, Li Yuanchao wrote:
DEFAULTS files are used by many files in the inner directory, so when DEFAULTS files change, those inner files should also be reload.
Signed-off-by: Li Yuanchao <lyc163mail@163.com> --- lib/git_mirror.rb | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/lib/git_mirror.rb b/lib/git_mirror.rb index 6417b52..017153f 100644 --- a/lib/git_mirror.rb +++ b/lib/git_mirror.rb @@ -285,10 +285,11 @@ class MirrorMain
def reload(file_list, belong) system("git -C #{REPO_DIR}/#{belong} pull") + reload_defaults(file_list, belong) file_list.each_line do |file| - next if File.basename(file) == '.ignore' - file = file.chomp + next if File.basename(file) == '.ignore' || File.basename(file) == 'DEFAULTS'
you can use: next if File.basename(file).match? /.ignore|DEFAULTS/ or next if %w[.ignore DEFAULTS].include? File.basename(file)
ok Thanks, Yuanchao