libgit2 / libgit2/libgit2sharp
Question/Feature request: Rebase branch using a Tag as upstream
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- C#
- Estrellas
- 3.5k
- Forks
- 925
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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?
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza en repo.Rebase.Start y en los tipos RebaseOptions, Branch y Tag mostrados en el informe; compara el parámetro upstream con la búsqueda de tags del repositorio y con la sintaxis equivalente de git rebase. Se considerará terminado cuando se haya establecido si se puede aceptar un tag como upstream y, si no, se hayan definido el cambio necesario en la API y su cobertura de validación.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- csharp, git
- Área
- devtools
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 35/100