oscript-library / oscript-library/gitsync

Ошибка при вызове gitsync без параметров

Open
#103 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug techical debt
Dominant language
1C Enterprise
Stars
333
Forks
98
PR merge metrics
No merged PRs in 30d

Description

При выполнении gitsync без параметров вне git-репозитория возникает ошибка:

C:\>gitsync
GitSync v2.4.0
ИНФОРМАЦИЯ - Начинаю синхронизацию хранилища 1С и репозитария GIT
ИНФОРМАЦИЯ - Получение изменений с удаленного узла (pull)
ОШИБКА - Получен ненулевой код возврата 128. Выполнение скрипта остановлено!
КРИТИЧНАЯОШИБКА - {Модуль C:\Program Files (x86)\OneScript\lib\gitrunner\src\ГитРепозиторий.os / Ошибка в строке: 840 / fatal: --local can only be used inside a git repository}

Выполнение gitsync внутри git-репозитория, не имеющего remote возникает ошибка:

C:\myRepo>gitsync
GitSync v2.4.0
ИНФОРМАЦИЯ - Начинаю синхронизацию хранилища 1С и репозитария GIT
ИНФОРМАЦИЯ - Получение изменений с удаленного узла (pull)
ОШИБКА - Получен ненулевой код возврата 1. Выполнение скрипта остановлено!
КРИТИЧНАЯОШИБКА - {Модуль C:\Program Files (x86)\OneScript\lib\gitrunner\src\ГитРепозиторий.os / Ошибка в строке: 840 / fatal: 'master' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.}

Ожидаемое поведение: gitsync без параметров не пытается выполнять какие-либо действия, а выводит usage.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce both invocations described in the issue: gitsync without parameters outside a repository and inside a repository without a remote. Start in the ГитРепозиторий.os code around line 840 and trace the command entry point and argument handling. Done means a no-argument invocation prints usage without attempting synchronization or producing the reported Git errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
git
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.