-
Notifications
You must be signed in to change notification settings - Fork 890
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In case of reabese of repository with submodules, submodules are left… #1788
base: master
Are you sure you want to change the base?
Conversation
… in non updatred state and prevent rebase from continuing. Fixed that by updating submodules after rebase was initialized.
LibGit2Sharp/Rebase.cs
Outdated
@@ -119,6 +119,8 @@ public virtual RebaseResult Start(Branch branch, Branch upstream, Branch onto, I | |||
ontoRefAnnotatedCommitHandle, | |||
gitRebaseOptions)) | |||
{ | |||
this.repository.Submodules.UpdateAll(new SubmoduleUpdateOptions()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like it as an optional parameter so we can override if it we want to pls.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What exactly you want to override here? AFAIK without that line rebase will not be possible to make.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am saying extract the new SubmoduleUpdateOptions()
to an optional param that you pass into UpdateAll
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, got it. Added them to RebaseOptions, i think that is most appropriate place.
LibGit2Sharp/RebaseOptions.cs
Outdated
@@ -41,6 +41,11 @@ public sealed class RebaseOptions : IConvertableToGitCheckoutOpts | |||
/// </summary> | |||
public CheckoutFileConflictStrategy FileConflictStrategy { get; set; } | |||
|
|||
/// <summary> | |||
/// Submodule update options passed to submodule updates on rtebase step. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo on rebase
?
@@ -70,6 +70,15 @@ public virtual void Init(string name, bool overwrite) | |||
} | |||
} | |||
|
|||
|
|||
public virtual void UpdateAll(SubmoduleUpdateOptions options) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SubmoduleCollection.cs(74,29): error CS1591: Missing XML comment for publicly visible type or member 'SubmoduleCollection.UpdateAll(SubmoduleUpdateOptions)' [/home/vsts/work/1/s/LibGit2Sharp/LibGit2Sharp.csproj]
This is making the build status fail. I noticed this afterwards.
@yatagarasu25 the build still fails because missing docs on that publicly visible member. |
@yatagarasu25 I just opened a pr to your fork to fix this pr. |
# Conflicts: # LibGit2Sharp/LibGit2Sharp.csproj
… in non updatred state and prevent rebase from continuing.
Fixed that by updating submodules after rebase was initialized.