History rewriting and documentaton#1185
History rewriting and documentaton#1185nulltoken merged 2 commits intolibgit2:vNextfrom Vogel612:HistoryRewriting_and_Documentaton
Conversation
|
Do you find the existing tests fail if you don't specify As for testing, I would suggest a |
|
@dahlbyk As of now the option does not have the default value |
|
Ah, I see - I missed that only tests that rewrite commits had been updated. Others may have a different opinion, but IMO if we're not specifically exercising the |
There was a problem hiding this comment.
Could we be a little more explicit about what information could be lost (and maybe a little less scary)?
Right now, this may be understood as "Use false, otherwise this will eat your hard drive for breakfast and nuke all your data in the Cloud". 😉
👍 |
|
HEAD for this PR after update has following test results when run on my machine: I can't fully decipher the stacktrace, but the error seems to come from Since this didn't show up in the travis-build I assume that's a local issue |
|
That error message is a bug in libgit2 where we call OpenSSL's context free function with an |
There was a problem hiding this comment.
darn monodevelop 😠
If that's the only thing I'd go ahead, fix this, squash the whole thing into two commits and update the PR. Everybody fine?
There was a problem hiding this comment.
Try out our roslyn branch. Be aware that memory consumption can skyrocket, but the editor is way more reliable.
|
Fixed the misindentation and adjusted the xml-doc and squashed the PR into two commits while rebasing onto vNext |
|
@Vogel612 Thanks for this very thorough work! One last nitpick, setting The proposal for changes below expresses this and also results in a passing test suite. Note: I've reverted the first line for the following reasons:
diff --git a/LibGit2Sharp.Tests/FilterBranchFixture.cs b/LibGit2Sharp.Tests/FilterBranchFixture.cs
index 32f6f69..d71cb22 100644
--- a/LibGit2Sharp.Tests/FilterBranchFixture.cs
+++ b/LibGit2Sharp.Tests/FilterBranchFixture.cs
@@ -185,7 +185,7 @@ public void CanRewriteAuthorOfCommitsOnlyBeingPointedAtByTags()
OnError = OnError,
OnSucceeding = OnSucceeding,
CommitHeaderRewriter =
- c => CommitRewriteInfo.From(c, message: "Bam!")
+ c => CommitRewriteInfo.From(c, message: "Bam!"),
}, commit);
AssertSucceedingButNotError();
@@ -591,7 +591,6 @@ public void CanRewriteParents()
{
OnError = OnError,
OnSucceeding = OnSucceeding,
- PrettifyMessages = true, // hashes are calculated with prettified messages
CommitParentsRewriter =
c =>
{
@@ -640,7 +639,6 @@ public void CanRewriteParentWithRewrittenCommit()
{
OnError = OnError,
OnSucceeding = OnSucceeding,
- PrettifyMessages = true, // hashes are calculated with prettified messages
CommitParentsRewriter =
c =>
c.Id != commitToRewrite.Id
@@ -699,7 +697,6 @@ public void CanProvideNewNamesForTags()
{
OnError = OnError,
OnSucceeding = OnSucceeding,
- PrettifyMessages = true, // hashes are calculated using prettified messages
CommitHeaderRewriter =
c => CommitRewriteInfo.From(c, message: ""),
TagNameRewriter = TagNameRewriter, |
The default prettifying behabiour now is: do not prettify Documentation for the new property of RewriteHistoryOptions
|
@nulltoken You're welcome. Changes applied and amended to previous commit. |
History rewriting and documentaton
|
🚀 Thanks! |
Implemented the breaking change for #621 and adjusted unit-tests to mimic behaviour before breakage.
Also adjusted the documentation for
Commit#this[relativePath]as discussed in #966Since I don't yet fully understand the history-rewriting unit-tests I have not added new Unit-Tests.
If I missed something, please do drop a note, so I can fix it 👍
Note: Running all tests gives me following results with Mono on a Ubunutu:
1989 okay, 0 failed, 0 errors, 0 inconclusive, 0 invalid, 17 ignored, 0 skipped