libgit2 / libgit2/libgit2sharp
Question/Feature request: Rebase branch using a Tag as upstream
まだ誰も着手していません。
- 主要言語
- C#
- スター
- 3.5k
- フォーク
- 925
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
This is potentially a feature request, if there is no way of accomplishing this using the current version of LibGit2Sharp
I am trying to use LibGit2Sharp to rebase a feature branch using a Tag as upstream. The initial graph looks like this:
* -- * -- * (featureA)
/
/
*--*--*--*--*--*--*--*--*--*--*--*-- (master)
| | | |
tag1 tag2 tag3 tag4
The idea is to rebase featureA branch on master, but not on the HEAD of master (last commit), but rather on the commit corresponding to tag2.
The end result would be something like this:
* -- * -- * (featureA)
/
/
*--*--*--*--*--*--*--*--*--*--*--*-- (master)
| | | |
tag1 tag2 tag3 tag4
The git syntax for this would be (and it works perfectly):
git rebase ref/tags/tag2 featureA
However, LibGit2Sharp syntax only allows passing in a Branch as argument for the upstream param.
var rebaseOptions = new RebaseOptions {...};
var identity = new Identity(...);
Branch branch = repo.Head;
Tag upstreamTag = repo.Tags[ontoTag];
var rebaseResult = repo.Rebase.Start(
branch,
upstream, // <-- this is where I am struggling to pass in this Tag as upstream
null,
identity,
rebaseOptions);
Is this achievable via LibGit2Sharp?
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
レポートに示されている repo.Rebase.Start と RebaseOptions、Branch、Tag 型から始め、upstream パラメータをリポジトリのタグ検索および同等の git rebase 構文と比較します。完了条件は、タグを upstream として受け入れられるかどうかを明らかにし、受け入れられない場合に必要な API の変更とその検証範囲を定義することです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- csharp, git
- 領域
- devtools
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 35/100