Repository object init with literal GIT_DIR
オープン
まだ誰も着手していません。
feature
- 主要言語
- Python
- スター
- 1.7k
- フォーク
- 408
- 平均マージ
- 2日 57分
- マージ済み PR(30日)
- 7
説明
Consider the following corner case:
ben@f1:/tmp$ git init --bare weird.git
Initialized empty Git repository in /tmp/weird.git/
ben@f1:/tmp$ cd weird.git
ben@f1:/tmp/weird.git$ git init --bare .git
Initialized empty Git repository in /tmp/weird.git/.git/
ben@f1:/tmp/weird.git$ git rev-parse --git-dir
.git
ben@f1:/tmp/weird.git$ GIT_DIR="./" git rev-parse --git-dir
./
ben@f1:/tmp/weird.git$ python3 -c 'import pygit2; print(pygit2.Repository("./"))'
pygit2.Repository('/tmp/weird.git/.git/')
ben@f1:/tmp/weird.git$ GIT_DIR=./ python3 -c 'import pygit2; print(pygit2.Repository("./"))'
pygit2.Repository('/tmp/weird.git/.git/')
It's possible to use git to work on the repo with GIT_DIR="/tmp/weird.git".
How can I use pygit2 to work on the same repo ("/tmp/weird.git") and not the other repo in "/tmp/weird.git/.git"? Essentially, I'd like to init a pygit2.Repository object with a literal GIT_DIR, without performing repository discovery.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
pygit2.Repository の初期化エントリーポイントから開始し、"./" の扱いを Git のリテラルな GIT_DIR の動作と比較してください。リテラルなパスをどのように表現すべきかを決める前に、libgit2 で利用可能なリポジトリのオープン動作を確認してください。/tmp/weird.git/.git を検出せずに Repository が /tmp/weird.git を対象にでき、このネストされたリポジトリのケースがカバレッジされていれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- git, python
- 領域
- devtools
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100