Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2sharp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornulltoken <emeric.fermas@gmail.com>2015-05-27 21:02:43 +0300
committernulltoken <emeric.fermas@gmail.com>2015-05-27 21:02:43 +0300
commit63f8d6d90f06f4578604b57502f2c6b8aabf4479 (patch)
tree3df6281a0c8d286694ee2b29bbc5d2b39ec12e8d /LibGit2Sharp
parentcc04c4342e9c518b21a4580f771f6a9985a90c67 (diff)
parent59eb6c80c110d0a1ecc6869ff093806f6c56df5c (diff)
Merge pull request #942 from libgit2/ntk/history_rewriter_notes
Restrict potential reference targets of HistoryRewriter
Diffstat (limited to 'LibGit2Sharp')
-rw-r--r--LibGit2Sharp/Core/HistoryRewriter.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/LibGit2Sharp/Core/HistoryRewriter.cs b/LibGit2Sharp/Core/HistoryRewriter.cs
index 15686ecc..d520b3c2 100644
--- a/LibGit2Sharp/Core/HistoryRewriter.cs
+++ b/LibGit2Sharp/Core/HistoryRewriter.cs
@@ -59,7 +59,11 @@ namespace LibGit2Sharp.Core
// before A.
foreach (var reference in refsToRewrite.OrderBy(ReferenceDepth))
{
- // TODO: Check how rewriting of notes actually behaves
+ // TODO: Rewrite refs/notes/* properly
+ if (reference.CanonicalName.StartsWith("refs/notes/"))
+ {
+ continue;
+ }
RewriteReference(reference);
}