8000 Update RemoteRedirectMode to match git_remote_redirect_t by bording · Pull Request #2027 · libgit2/libgit2sharp · GitHub
[go: up one dir, main page]

Skip to content

Update RemoteRedirectMode to match git_remote_redirect_t #2027

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
merged 1 commit into from
Apr 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LibGit2Sharp/Core/GitFetchOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
2 changes: 1 addition & 1 deletion LibGit2Sharp/Core/GitPushOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
8 changes: 4 additions & 4 deletions LibGit2Sharp/RemoteRedirectMode.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
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.
Expand All @@ -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
}
}
0