pygit2: How to implement `git clone --single-branch`?
オープン
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 1.7k
- フォーク
- 408
- 平均マージ
- 2日 57分
- マージ済み PR(30日)
- 7
説明
$ git clone -h
usage: git clone [<options>] [--] <repo> [<dir>]
...
-b, --branch <branch>
checkout <branch> instead of the remote's HEAD
...
--single-branch clone only one branch, HEAD or --branch
Hi, all. git clone has an option (i.e. --single-branch) to specify only clone one branch.
Just wonder if anyone knows how to implement this functionality with pygit2?
With --single-branch, git branch -a will has only one branch, not all remote branches.
--
Might be helpful:
https://github.com/libgit2/libgit2/issues/2924
https://github.com/nodegit/nodegit/issues/1669
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
pygit2 の clone 機能から始め、文書化されている git clone --single-branch の動作と比較してください。実装の背景を把握するため、リンクされている libgit2 と nodegit の issue を確認してください。git branch -a にすべてのリモートブランチが表示されず、HEAD または選択したブランチだけがクローンされれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- git, python
- 領域
- devtools
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100