Update RemoteRedirectMode to match git_remote_redirect_t

上级 8ae99228
......@@ -11,7 +11,7 @@ internal class GitFetchOptions
public bool UpdateFetchHead = true;
public TagFetchMode download_tags;
public GitProxyOptions ProxyOptions;
public RemoteRedirectMode FollowRedirects = RemoteRedirectMode.Auto;
public RemoteRedirectMode FollowRedirects = RemoteRedirectMode.Initial;
public GitStrArrayManaged CustomHeaders;
}
}
......@@ -9,7 +9,7 @@ internal class GitPushOptions
public int PackbuilderDegreeOfParallelism;
public GitRemoteCallbacks RemoteCallbacks;
public GitProxyOptions ProxyOptions;
public RemoteRedirectMode FollowRedirects = RemoteRedirectMode.Auto;
public RemoteRedirectMode FollowRedirects = RemoteRedirectMode.Initial;
public GitStrArrayManaged CustomHeaders;
}
}
namespace LibGit2Sharp
{
/// <summary>
/// Remote redirection settings; wehther redirects to another
/// Remote redirection settings; whether redirects to another
/// host are permitted. By default, git will follow a redirect
/// on the initial request (`/info/refs`) but not subsequent
/// requests.
......@@ -12,17 +12,17 @@ public enum RemoteRedirectMode
/// Do not follow any off-site redirects at any stage of
/// the fetch or push.
/// </summary>
None = 0, // GIT_REMOTE_REDIRECT_NONE
None = 1 << 0, // GIT_REMOTE_REDIRECT_NONE
/// <summary>
/// Allow off-site redirects only upon the initial
/// request. This is the default.
/// </summary>
Auto, // GIT_REMOTE_REDIRECT_INITIAL
Initial = 1 << 1, // GIT_REMOTE_REDIRECT_INITIAL
/// <summary>
/// Allow redirects at any stage in the fetch or push.
/// </summary>
All // GIT_REMOTE_REDIRECT_ALL
All = 1 << 2 // GIT_REMOTE_REDIRECT_ALL
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册