darktable-org / darktable-org/lua-scripts

git commands not running on Windows

オープン
#671 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Lua
スター
219
フォーク
142
PR マージ指標
30日以内にマージされた PR はありません

説明

On windows executing the git command fails from the lua scripts.
It might have something to do with my repo path containing a space. Thought just putting quotes around it does not fix it, there might be strange behaviour in combination with the & concatenator as well.
io.popen("cd " .. repo .. CS .. "git status")
->

fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
     8,8792 LUA ERROR: script_manager.lua: get_current_repo_branch: 318: no current branch detected in repo_data

In my opinion a better solution would be to use the -C <path> argument of git for all commands instead of changing the directory, and also quoting the repo string:
io.popen("git -C \"" .. repo .. "\" status")

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

script_manager.lua の 318 行目付近にある get_current_repo_branch から始め、io.popen を通じて git を呼び出している Lua スクリプトを追跡してください。Windows でスペースを含むリポジトリパスをテストし、git status およびその他の影響を受けるコマンドが、ディレクトリを変更せずにリポジトリを正しく解決することを確認してください。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
git, lua
領域
cli
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
62/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。