cake-contrib / Cake_Git

Cake AddIn that extends Cake with Git features using LibGit2 and LibGit2Sharp
https://cakebuild.net/extensions/cake-git
Other
39 stars 64 forks source link

Add option to load tag targets before disposing the repository #129

Closed KatoStoelen closed 3 years ago

KatoStoelen commented 3 years ago

When using GitTags, the libgit2sharp repository is disposed when the tags are returned. Hence, accessing a tag's target properties, which are lazily loaded, throws an exception.

Added an optional parameter (loadTargets) to GitTags. When set to true, the target of all the tags are loaded before the repository is disposed, enabling access to those. The loadTargets parameter defaults to false, to make this an opt-in feature.

Fixes #72

KatoStoelen commented 3 years ago

I suspect that this would fix #56 as well. However, there's not a lot of information in that issue.

KatoStoelen commented 3 years ago

Blah, feeling confident ATM.

Fixes #56

pascalberger commented 3 years ago

@KatoStoelen your changes have been merged, thanks for your contribution 👍