MergeOptions: TargetLimit (merge.renameLimit) is being ignored during merge operation
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 38/100
Piste de recherche
Commencez par suivre la valeur de MergeOptions.TargetLimit depuis repo.Merge à travers l’opération de merge, en la comparant à la manière dont la commande git merge lit merge.renameLimit depuis .gitconfig. Reproduisez le scénario Foo.cs-to-Bar.cs avec la disposition de branches fournie et vérifiez que le merge s’effectue sans conflit lorsque TargetLimit vaut 7000.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Reproduction steps
The sourceBranch and targetBranch has a commonAncestorCommit with an existing file Foo.cs. A lot of (let's say: 3000) other files exist too.
The sourceBranch contains one single extra commit on top of commonAncestorCommit with a modification inside a file Foo.cs.
The targetBranch (current branch) contains one single extra commit on top of commonAncestorCommit in which the file Foo.cs has been renamed to Bar.cs, and a lot of (let's say: 2000) other files have also been renamed.
The following merge from sourceBranch to targetBranch ignores TargetLimit (merge.renameLimit), and causes an unnecessary conflict:
using (var repo = new Repository(...))
{
Commands.Checkout(repo, targetBranch);
var mergeOptions = new MergeOptions { TargetLimit = 7000 };
repo.Merge(sourceBranch, mergerSignature, mergeOptions)
}
Expected behavior
A successful merge without conflict.
Actual behavior
We are staying in the ongoing merge operation, and the git status reports conflict for the file Foo.cs stating that it has been "deleted by us".
Note that the plain git merge command can merge this without conflicts if the merge.renameLimit setting is set to 7000 in the .gitconfig file.
Version of LibGit2Sharp (release number or SHA1)
LibGit2Sharp 0.26.2
LibGit2Sharp 0.27.0-preview-0182
Operating system(s) tested; .NET runtime tested
Windows 10 Enterprise N
.NET 6.0.8
- Langage dominant
- C#
- Étoiles
- 3.5k
- Forks
- 925
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de libgit2/libgit2sharp
-
Difficulté 4/5 3-5 jours Accessibilité débutants 52/100
libgit2/libgit2sharp#2193 · 2 commentaires ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 38/100
libgit2/libgit2sharp#2192 · 1 commentaire ·
-
Website is down Ouverte
Difficulté 4/5 3-5 jours Accessibilité débutants 20/100
libgit2/libgit2sharp#2191 · 2 réactions ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 68/100
libgit2/libgit2sharp#2189 · 1 réaction ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 35/100
libgit2/libgit2sharp#2187 · 2 commentaires ·
Toutes les issues de libgit2/libgit2sharp
Issues similaires
-
bug
Difficulté 1/5 Moins d'une heure Accessibilité débutants 75/100
sillsdev/languageforge-lexbox#2665 ·
-
bug documentation frontend
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
azurenoops/spin_agent#975 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 86/100
-
:watch: Not Triaged 11.0 fundamentals/subsvc
Difficulté 2/5 1-3 heures Accessibilité débutants 92/100
dotnet/AspNetCore.Docs#37699 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
SubtitleEdit/subtitleedit#15108 · 1 commentaire ·