From a711af3ec87af5d885b281e7d5285599c71238db Mon Sep 17 00:00:00 2001 From: Alexander Zhirov Date: Mon, 2 Jun 2025 19:35:51 +0300 Subject: [PATCH] =?UTF-8?q?Revert=20"=D0=A1=D0=BC=D0=B5=D0=BD=D0=B0=20?= =?UTF-8?q?=D0=BE=D1=82=D0=BD=D0=BE=D1=81=D0=B8=D1=82=D0=B5=D0=BB=D1=8C?= =?UTF-8?q?=D0=BD=D0=BE=D0=B3=D0=BE=20=D0=BF=D1=83=D1=82=D0=B8=20=D0=BF?= =?UTF-8?q?=D1=80=D0=BE=D0=B5=D0=BA=D1=82=D0=B0=20=D0=BD=D0=B0=20=D0=B0?= =?UTF-8?q?=D0=B1=D1=81=D0=BE=D0=BB=D1=8E=D1=82=D0=BD=D1=8B=D0=B9,=20?= =?UTF-8?q?=D0=BA=D0=BE=D1=82=D0=BE=D1=80=D1=8B=D0=B9=20=D0=B8=D1=81=D0=BF?= =?UTF-8?q?=D1=80=D0=B0=D0=B2=D0=BB=D1=8F=D0=B5=D1=82=20=D0=BF=D1=80=D0=BE?= =?UTF-8?q?=D0=B1=D0=BB=D0=B5=D0=BC=D1=83=20=D0=BF=D1=80=D0=B8=20=D1=80?= =?UTF-8?q?=D0=B0=D0=B1=D0=BE=D1=82=D0=B5=20=D1=81=20=D0=BF=D1=80=D0=BE?= =?UTF-8?q?=D0=B5=D0=BA=D1=82=D0=BE=D0=BC=20=D0=B2=D0=BE=20=D0=B2=D1=80?= =?UTF-8?q?=D0=B5=D0=BC=D1=8F=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D1=8F/=D0=B2=D0=BE=D1=81=D1=81=D1=82=D0=B0=D0=BD?= =?UTF-8?q?=D0=BE=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8=D1=8F"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Выявлены проблемы при добавлении в индекс. Использование утилиты на Windows показало, что при добавлении полный путь вызывает ошибку, так как он идентифицируется за пределами проекта. Решено использовать в рамках конктекста "-C " добавление как "add ." отсносительно корня проекта. This reverts commit ee41d5f96d01794907c390209e1d7163c55896f8. --- source/snag/core/core.d | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source/snag/core/core.d b/source/snag/core/core.d index 7f5f9a1..4196481 100644 --- a/source/snag/core/core.d +++ b/source/snag/core/core.d @@ -158,7 +158,7 @@ class Snag { result = execute(_baseCommand ~ ["rev-parse", "--short", "HEAD"]); if (result.status == 128) { // Если это самый первый коммит после инициализации репозитория - git(["add", _config.project], "Failed to prepare files for archiving"); + git(["add", "."], "Failed to prepare files for archiving"); git(["commit", "-m"] ~ message, "Failed to create a snapshot"); newSnapshot = git( ["rev-parse", "--short", "HEAD"], @@ -197,7 +197,7 @@ class Snag { "Failed to create a branch from the current state" ); git( - ["add", _config.project], + ["add", "."], "Failed to prepare files for archiving" ); git( @@ -211,7 +211,7 @@ class Snag { } else { // Если коммит является посленим в ветке git( - ["add", _config.project], + ["add", "."], "Failed to prepare files for archiving" ); git( @@ -273,7 +273,7 @@ class Snag { ); if (result.output.length) { git( - ["restore", _config.project], + ["restore", "."], "Failed to reset file changes state" ); git( @@ -406,7 +406,7 @@ class Snag { ); // Создание нового снимка на основе состояния файлов из распакованного архива - result = execute(customCommand ~ ["add", tempDirectory]); + result = execute(customCommand ~ ["add", "."]); result.status && throw new SnagException( "Failed to prepare files for archiving:\n" @@ -427,7 +427,7 @@ class Snag { // Сброс состояния файлов git( - ["restore", _config.project], + ["restore", "."], "Failed to reset file changes state" ); git(