From 9f8759238b75948e9cd86ca73a3aa023fc872e3d Mon Sep 17 00:00:00 2001 From: Alexander Zhirov Date: Wed, 28 May 2025 02:26:55 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20=D1=84=D0=B8=D0=BB=D1=8C=D1=82=D1=80=20=D0=BF=D0=BE=20?= =?UTF-8?q?=D0=B8=D1=81=D0=BA=D0=BB=D1=8E=D1=87=D0=B5=D0=BD=D0=B8=D1=8E=20?= =?UTF-8?q?=D0=BF=D1=83=D1=81=D1=82=D1=8B=D1=85=20=D1=81=D1=82=D1=80=D0=BE?= =?UTF-8?q?=D0=BA=20=D0=B2=20=D0=BE=D1=82=D0=B2=D0=B5=D1=82=D0=B5=20=D0=BE?= =?UTF-8?q?=D1=82=20git-=D0=B2=D1=8B=D0=B7=D0=BE=D0=B2=D0=B0,=20=D1=82?= =?UTF-8?q?=D0=B0=D0=BA=20=D0=BA=D0=B0=D0=BA=20=D0=BE=D1=82=D0=B2=D0=B5?= =?UTF-8?q?=D1=82=20=D0=BC=D0=BE=D0=B6=D0=B5=D1=82=20=D0=B1=D1=8B=D1=82?= =?UTF-8?q?=D1=8C=20=D0=BF=D1=83=D1=81=D1=82=D1=8B=D0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/snag/core/rules.d | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/snag/core/rules.d b/source/snag/core/rules.d index ef585bd..d8a2c9c 100644 --- a/source/snag/core/rules.d +++ b/source/snag/core/rules.d @@ -86,7 +86,7 @@ class SnagRules { git( ["diff", "--cached", "--name-only"], "Failed to retrieve the list of files removed from tracking" - ).output.split('\n')[0..$-1].each!( + ).output.split('\n').filter!(e => !e.strip.empty).each!( file => git( ["add", "-f", file], "Failed to restore the file to tracking" @@ -98,7 +98,7 @@ class SnagRules { git( ["ls-files", "-i", "-c", "--exclude-standard"], "Failed to get the list of files to remove from tracking" - ).output.split('\n')[0..$-1].each!( + ).output.split('\n').filter!(e => !e.strip.empty).each!( file => git( ["rm", "--cached", file], "Failed to remove file from tracking"