Skip to content

Improve shallow clone exception #1287

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

asbjornu
Copy link
Member

@asbjornu asbjornu commented Sep 5, 2017

Improve upon the LibGit2Sharp.NotFoundException thrown when a commit ID can't be found due to a shallow clone by adding instructions to do git fetch --unshallow. Fixes #1043.

@asbjornu asbjornu force-pushed the feature/improve-shallow-clone-exception branch 2 times, most recently from 8484401 to 0667aeb Compare September 5, 2017 10:18
using System.Runtime.Serialization;

[Serializable]
public class GitVersionException : ApplicationException
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you consider deriving from GitToolsException instead : https://github.com/GitTools/GitTools.Core/blob/11fa325b9f7afa0f9d8abf12d260210f82a29e15/src/GitTools.Core/Exceptions/GitToolsException.cs - It will make it a bit easier to get this building under netstandard1.3 where ApplicationException isn't avialable, and it will also make exceptions accross the tools more consistent which I think was the purpose behind GitToolsException.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dazinator: Sure. Done.

@@ -0,0 +1,32 @@
#region License

// --------------------------------------------------
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@asbjornu where is this license coming from?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. It's from ReSharper, but I thought GitVersion's DotSettings should override it? Either way, it's gone.

@asbjornu asbjornu force-pushed the feature/improve-shallow-clone-exception branch from 3e20f8e to a90ce42 Compare September 6, 2017 11:07
Copy link
Member

@gep13 gep13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@gep13 gep13 merged commit 489f9d0 into GitTools:master Sep 6, 2017
@asbjornu asbjornu deleted the feature/improve-shallow-clone-exception branch September 26, 2017 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants