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
Ensure strings are absent of extra zeroes #703
Conversation
@@ -195,7 +202,7 @@ static void DoFetch(RemoteSafeHandle remoteHandle, FetchOptions options, Signatu | |||
{ | |||
Ensure.ArgumentNotNull(remote, "remote"); | |||
Ensure.ArgumentNotNull(objectish, "objectish"); | |||
Ensure.ArgumentNotNullOrEmptyString(destinationSpec, destinationSpec); | |||
Ensure.ArgumentNotNullOrEmptyString(destinationSpec, "destinationSpec"); |
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.
Nice catch.
@@ -100,6 +101,8 @@ public virtual Remote Add(string name, string url) | |||
{ | |||
Ensure.ArgumentNotNull(name, "name"); |
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.
I think this may also rather be NotNullOrEmpty
This one should do, or I will get killed for my incompetence 😱 😄 |
@someoneigna The builds appears to fail. Could you please review the logs? |
@@ -92,6 +92,8 @@ static void DoFetch(RemoteSafeHandle remoteHandle, FetchOptions options, Signatu | |||
Proxy.git_remote_set_autotag(remoteHandle, options.TagFetchMode.Value); | |||
} | |||
|
|||
Ensure.ArgumentDoesNotContainZeroByte(logMessage, "logMessage"); |
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.
Maybe move this to the top of the method, as we tend to do for arg validation?
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.
Done 👍
before reaching libgit2.
Checks for extra zeroes in strings passed to libgit2 functions.
Fixes #571