Skip to content
This repository has been archived by the owner on Dec 2, 2021. It is now read-only.

Fails when two tags point to the same commit #60

Open
redwyre opened this issue Apr 12, 2019 · 0 comments
Open

Fails when two tags point to the same commit #60

redwyre opened this issue Apr 12, 2019 · 0 comments

Comments

@redwyre
Copy link

redwyre commented Apr 12, 2019

Fody 2.4.6, Stamp.Fody 1.4.2

LibGitEx.FindVersionTag throws if two tags have the same commit, when trying to put them into a dictionary.

I'll probably just try to get rid of the extra tag, if not would you like a PR?

Fody: An unhandled exception occurred:
Exception:
An item with the same key has already been added.
Type:
System.ArgumentException
StackTrace:
   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
   at LibGitEx.FindVersionTag(Repository repository) in C:\projects\fody-stamp\Fody\LibGitEx.cs:line 18
   at FormatStringTokenResolver.ReplaceTokens(String template, ModuleDefinition moduleDefinition, Repository repo, String changestring) in C:\projects\fody-stamp\Fody\FormatStringTokenResolver.cs:line 37
   at ModuleWeaver.Execute() in C:\projects\fody-stamp\Fody\ModuleWeaver.cs:line 71
   at lambda_method(Closure , Object )
   at InnerWeaver.ExecuteWeavers() in C:\projects\fody\FodyIsolated\InnerWeaver.cs:line 200
   at InnerWeaver.Execute() in C:\projects\fody\FodyIsolated\InnerWeaver.cs:line 102
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant