Skip to content

Commit 2dc649e

Browse files
committed
Added SubmoduleUpdateOptions to rebase options.
1 parent 8967743 commit 2dc649e

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

Diff for: LibGit2Sharp/Rebase.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public virtual RebaseResult Start(Branch branch, Branch upstream, Branch onto, I
119119
ontoRefAnnotatedCommitHandle,
120120
gitRebaseOptions))
121121
{
122-
this.repository.Submodules.UpdateAll(new SubmoduleUpdateOptions());
122+
this.repository.Submodules.UpdateAll(options.SubmoduleUpdateOptions);
123123

124124
RebaseResult rebaseResult = RebaseOperationImpl.Run(rebaseOperationHandle,
125125
this.repository,

Diff for: LibGit2Sharp/RebaseOptions.cs

+5
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ public sealed class RebaseOptions : IConvertableToGitCheckoutOpts
4141
/// </summary>
4242
public CheckoutFileConflictStrategy FileConflictStrategy { get; set; }
4343

44+
/// <summary>
45+
/// Submodule update options passed to submodule updates on rtebase step.
46+
/// </summary>
47+
public SubmoduleUpdateOptions SubmoduleUpdateOptions { get; set; }
48+
4449
CheckoutCallbacks IConvertableToGitCheckoutOpts.GenerateCallbacks()
4550
{
4651
return CheckoutCallbacks.From(OnCheckoutProgress, OnCheckoutNotify);

Diff for: LibGit2Sharp/SubmoduleCollection.cs

+2
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ public virtual void Init(string name, bool overwrite)
7373

7474
public virtual void UpdateAll(SubmoduleUpdateOptions options)
7575
{
76+
options = options ?? new SubmoduleUpdateOptions();
77+
7678
foreach (var sm in this)
7779
Update(sm.Name, options);
7880
}

0 commit comments

Comments
 (0)