RU
Добавлено:
-
Параметр
--vcsдля командnewиinit— добавлена возможность явно указывать систему контроля версий через--vcs <git|none>. -
Интеграция Git-информации в
--version— утилита теперь выводит текущий короткий хэш коммита и суффикс-dirty, если в репозитории DCR есть незакоммиченные изменения. -
Автоматическая генерация
.gitignore— при инициализации Git-репозитория автоматически создается файл.gitignoreс исключением директории/target. -
Защита от вложенных репозиториев — автоматическая инициализация Git теперь пропускается, если
dcr newилиdcr initзапускаются внутри уже существующего Git-репозитория. -
Тесты для верификации VCS — добавлены интеграционные тесты
new_vcs_options_workиinit_vcs_options_workдля проверки логики инициализации репозиториев.
Изменено:
-
Полный отказ от библиотеки
git2— работа с Git (клонирование зависимостей, инициализация VCS, проверка статуса) переведена на вызовы системногоgitчерезCommand. Это облегчает сборку проекта и убирает необходимость в фичахvendoredиopenssl. -
Миграция с
reqwestнаureq— в модуле обновления (flag_update.rs) тяжелыйreqwestзаменен на легковесный синхронный клиентureq 2.10, что уменьшило оверхед и размер итогового бинарника.
EN
Added:
-
--vcsoption fornewandinitcommands — introduced explicit version control system selection via--vcs <git|none>. -
Git metadata integration in
--version— the CLI now appends the current short commit hash and a-dirtysuffix if there are uncommitted changes in the DCR repository. -
Automatic
.gitignoregeneration — Git repository initialization now automatically writes a.gitignorefile excluding the/targetdirectory. -
Nested repository prevention — automatic Git initialization is now skipped if
dcr newordcr initis executed inside an already existing Git repository. -
VCS verification tests — added
new_vcs_options_workandinit_vcs_options_workintegration tests to ensure reliable repository behavior.
Changed:
-
Complete removal of
git2dependency — all Git actions (dependency fetching, VCS setup, status checks) are now delegated to the systemgitexecutable viaCommand. This simplifies compilation and drops the need forvendoredandopensslfeatures. -
Migrated from
reqwesttoureq— replaced the heavyreqwestcrate inflag_update.rswith the lightweight synchronousureq 2.10client, reducing overhead and the final binary size.