The Filter API contains singleton Entry-points which are agnostic to `FilterMode`, does having `Clean` and `Smudge` entry-points make sense?
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- リファクタリング
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- csharp, git
調査の方向性
まず、issue で提案されたシグネチャ変更の影響を受けるものとして特定されている、公開された Filter API と関連するテストを確認します。次に、.gitattributes の clean マクロと smudge マクロがどのように処理されるかを調べます。完了には、合意された API 設計、更新された依存側、およびテストの成功が必要です。
索引モデルが issue の本文から書いたものです。
説明
Today the Filter object (the API we expose to lib consumers) contains the following entry-points:
virtual void Initialize()virtual void Complete(string path, string root, Stream output)virtual void Create(string path, string root, FilterMode)virtual void Clean(string path, string root, Stream input, Stream output)virtual void Smudge(string path, string root, Stream input, Stream output)
This is very uneven and, to my OCD, a fairly inconsistent API. I'm responsible and I'd like to change it, however some have already taken a dependency. In the spirit of #1103 I suggest changing the API to the following.
virtual void Initialize()virtual void Complete(string root, string path, Stream output, FilterMode mode)virtual void Create(string root, string path, FilterMode mode)virtual void Apply(string root, string path, Stream input, Stream output, FilterMode mode)
I believe this is a simplified API which presents a consistent set of entry-points, and leaves the mode management up to the implementation of Filter. I'll happily make the changes and update the associated tests.
As a side note, I had a side-band discussion with @ethomson about how to handle the .gitattributes macros (example: [filter "lfs"] \n clean = git lfs clean %f \n smudge = git lfs smudge %f). While there are normal situations when you just know(tm) what to do on smudge and clean callbacks, ideally the filter would at least aware if the user has edited the values of the macro.
Assuming we can find a solution, whatever solution we'll find will likely end up impact this API. Perhaps then we should combine the two discussions here.
/CC @ammeep @shiftkey @nulltoken
- 主要言語
- C#
- スター
- 3.5k
- フォーク
- 925
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
libgit2/libgit2sharp のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
libgit2/libgit2sharp#2193 · コメント 2 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
libgit2/libgit2sharp#2192 · コメント 1 件 ·
-
Website is down オープン
難易度 4/5 3〜5日 初心者へのやさしさ 20/100
libgit2/libgit2sharp#2191 · リアクション 2 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
libgit2/libgit2sharp#2189 · リアクション 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
libgit2/libgit2sharp#2187 · コメント 2 件 ·
libgit2/libgit2sharp の issue をすべて見る
似ている issue
-
type/automation type/tech-debt
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
t/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
area:auth FE mvp P3
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
klasolsson81/jobbliggaren#1788 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
OrchardCMS/OrchardCore#19919 · コメント 2 件 ·
-
app-frontend: parked task URL throws 'Unknown task type' once the process moves on to a signing task オープンarea/process kind/bug squad/flyt squad/utforming
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
Altinn/altinn-studio#20570 ·