81 lines
3.6 KiB
Diff
81 lines
3.6 KiB
Diff
diff --git a/stdlib/LibGit2/src/consts.jl b/stdlib/LibGit2/src/consts.jl
|
|
index 5a5b8b74e7127..8c140e8c2aa30 100644
|
|
--- a/stdlib/LibGit2/src/consts.jl
|
|
+++ b/stdlib/LibGit2/src/consts.jl
|
|
@@ -417,7 +417,32 @@ Option flags for `GitRepo`.
|
|
FEATURE_SSH = Cuint(1 << 2),
|
|
FEATURE_NSEC = Cuint(1 << 3))
|
|
|
|
-if version() >= v"0.24.0"
|
|
+if version() >= v"1.8.0"
|
|
+ @doc """
|
|
+ Priority level of a config file.
|
|
+
|
|
+ These priority levels correspond to the natural escalation logic (from higher to lower) when searching for config entries in git.
|
|
+
|
|
+ * `CONFIG_LEVEL_DEFAULT` - Open the global, XDG and system configuration files if any available.
|
|
+ * `CONFIG_LEVEL_PROGRAMDATA` - System-wide on Windows, for compatibility with portable git
|
|
+ * `CONFIG_LEVEL_SYSTEM` - System-wide configuration file; `/etc/gitconfig` on Linux systems
|
|
+ * `CONFIG_LEVEL_XDG` - XDG compatible configuration file; typically `~/.config/git/config`
|
|
+ * `CONFIG_LEVEL_GLOBAL` - User-specific configuration file (also called Global configuration file); typically `~/.gitconfig`
|
|
+ * `CONFIG_LEVEL_LOCAL` - Repository specific configuration file; `\$WORK_DIR/.git/config` on non-bare repos
|
|
+ * `CONFIG_LEVEL_WORKTREE` - Worktree specific configuration file; `\$GIT_DIR/config.worktree`
|
|
+ * `CONFIG_LEVEL_APP` - Application specific configuration file; freely defined by applications
|
|
+ * `CONFIG_HIGHEST_LEVEL` - Represents the highest level available config file (i.e. the most specific config file available that actually is loaded)
|
|
+ """
|
|
+ @enum(GIT_CONFIG, CONFIG_LEVEL_DEFAULT = 0,
|
|
+ CONFIG_LEVEL_PROGRAMDATA = 1,
|
|
+ CONFIG_LEVEL_SYSTEM = 2,
|
|
+ CONFIG_LEVEL_XDG = 3,
|
|
+ CONFIG_LEVEL_GLOBAL = 4,
|
|
+ CONFIG_LEVEL_LOCAL = 5,
|
|
+ CONFIG_LEVEL_WORKTREE = 6,
|
|
+ CONFIG_LEVEL_APP = 7,
|
|
+ CONFIG_HIGHEST_LEVEL =-1)
|
|
+elseif version() >= v"0.24.0"
|
|
@doc """
|
|
Priority level of a config file.
|
|
|
|
diff --git a/stdlib/LibGit2/src/types.jl b/stdlib/LibGit2/src/types.jl
|
|
index 96cea96d013e5..b0b463c69e2f1 100644
|
|
--- a/stdlib/LibGit2/src/types.jl
|
|
+++ b/stdlib/LibGit2/src/types.jl
|
|
@@ -678,6 +678,8 @@ The fields represent:
|
|
for more information.
|
|
* `custom_headers`: only relevant if the LibGit2 version is greater than or equal to `0.24.0`.
|
|
Extra headers needed for the push operation.
|
|
+ * `remote_push_options`: only relevant if the LibGit2 version is greater than or equal to `1.8.0`.
|
|
+ "Push options" to deliver to the remote.
|
|
"""
|
|
@kwdef struct PushOptions
|
|
version::Cuint = Cuint(1)
|
|
@@ -692,6 +694,9 @@ The fields represent:
|
|
@static if LibGit2.VERSION >= v"0.24.0"
|
|
custom_headers::StrArrayStruct = StrArrayStruct()
|
|
end
|
|
+ @static if LibGit2.VERSION >= v"1.8.0"
|
|
+ remote_push_options::StrArrayStruct = StrArrayStruct()
|
|
+ end
|
|
end
|
|
@assert Base.allocatedinline(PushOptions)
|
|
|
|
@@ -913,10 +918,17 @@ Matches the [`git_config_entry`](https://libgit2.org/libgit2/#HEAD/type/git_conf
|
|
struct ConfigEntry
|
|
name::Cstring
|
|
value::Cstring
|
|
+ @static if LibGit2.VERSION >= v"1.8.0"
|
|
+ backend_type::Cstring
|
|
+ origin_path::Cstring
|
|
+ end
|
|
include_depth::Cuint
|
|
level::GIT_CONFIG
|
|
free::Ptr{Cvoid}
|
|
- payload::Ptr{Cvoid} # User is not permitted to read or write this field
|
|
+ @static if LibGit2.VERSION < v"1.8.0"
|
|
+ # In 1.8.0, the unused payload value has been removed
|
|
+ payload::Ptr{Cvoid}
|
|
+ end
|
|
end
|
|
@assert Base.allocatedinline(ConfigEntry)
|
|
|