Closed dazinator closed 9 years ago
The builder has been written. The following (taken from unit test) shows how it is used:
IRefSpecBuilder builder = new RefSpecBuilder();
RefSpecInfo spec = builder.Source("refs/heads/*")
.Destination("refs/remotes/origin/*")
.ForceUpdateIfFastForwardNotPossible()
.ToRefSpec();
Assert.That(spec.Source, Is.EqualTo("refs/heads/*"));
Assert.That(spec.Destination, Is.EqualTo("refs/remotes/origin/*"));
Assert.That(spec.ForceUpdateWhenFastForwardNotAllowed);
Assert.That(spec.ToString(), Is.EqualTo("+refs/heads/*:refs/remotes/origin/*"));
You can also pass the builder in an existing refspec to modify it.
Provide a fluent builder for RefSpec's
For example consider the refspec:
+refs/heads/*:refs/remotes/origin/*
So, create a builder API for building that type of string, something like this: