From 48b42f0cb17a7252b8de7a23b6ab1759526694c0 Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Fri, 22 Sep 2023 14:47:38 -0700 Subject: [PATCH] Cleanup --- lua/config/util.lua | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lua/config/util.lua b/lua/config/util.lua index d79ddf5..423ffad 100644 --- a/lua/config/util.lua +++ b/lua/config/util.lua @@ -13,22 +13,17 @@ local function git_streak() end local root_dir = call({'git', 'rev-parse', '--show-toplevel'}) - if #root_dir == 0 then - return - end - local author = call({'git', 'config', 'user.name'}) - if #author == 0 then - return - end local hash = call{'git', 'log', '-n1', '--author="^((?!' .. author .. ').)*$"', '--perl-regexp', '--pretty=format:"%H"'} if #hash == 0 then + print('All commits are by current author') return end local names = call({'git', 'diff', '--name-only', hash}) if #names == 0 then + print('No files changed since previous author') return end