Problem with implement the equiv of git pull
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 1.7k
- フォーク
- 408
- 平均マージ
- 2日 57分
- マージ済み PR(30日)
- 7
説明
I am working my way through an implementation of git pull.
It seems that I need to do a Remote.fetch() call followed by a merge.
Problem (1): what is the robust way to generate the fetch_refspecs if the REmote.fetch_refspecs is empty? In other words do you have the APIs that I can duplciaste what push.default=simple causes git pull to do?
Problem (2): I have the objects fetched back I do not know the API to call to merge the remote changed into the local. I tried calling repo.merge() with the ID of the lastest commit from the remote.
But that only lead to modified files in the index. What is the correct API code to make this work?
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、issue で言及されている Remote.fetch、Remote.fetch_refspecs、Repository.merge API と、git pull が push.default=simple をどのように使用するかを読みます。サポートされている fetch と merge のシーケンスを確認し、取得したリモートの変更がインデックスの変更だけを残すのではなく、ローカルリポジトリにマージされることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- git, python
- 領域
- devtools
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100