-
Notifications
You must be signed in to change notification settings - Fork 654
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
Improve shallow clone exception #1287
Conversation
8484401
to
0667aeb
Compare
using System.Runtime.Serialization; | ||
|
||
[Serializable] | ||
public class GitVersionException : ApplicationException |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 | |||
|
|||
// -------------------------------------------------- |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
… the repository might be a shallow clone
3e20f8e
to
a90ce42
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Improve upon the
LibGit2Sharp.NotFoundException
thrown when a commit ID can't be found due to a shallow clone by adding instructions to dogit fetch --unshallow
. Fixes #1043.