diff --git a/CHANGELOG.md b/CHANGELOG.md index 78b639e..1737cad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,23 +1,3 @@ -## 1.2.0 - -- feat: upgrade libgit2 to 1.5.0 - -- feat: add ability to pass checkout options to `reset(...)` API method - -- feat: add ability to pass options to `prune(...)` Worktree API method - -- feat: add ability to pass options to `Merge.fileFromIndex(...)` API method - -- feat: add ability to pass options to `addAll(...)` Index API method - -- feat: add ability to pass options to `revert(...)` and `revertTo(...)` Commit API methods: - - - select parent to revert to for merge commits - - merge options - - checkout options - -- chore: upgrade dependencies - ## 1.1.2 - fix: lookup library in Flutter's .pub_cache folder diff --git a/lib/src/bindings/libgit2_bindings.dart b/lib/src/bindings/libgit2_bindings.dart index e7c322b..f220431 100644 --- a/lib/src/bindings/libgit2_bindings.dart +++ b/lib/src/bindings/libgit2_bindings.dart @@ -2217,23 +2217,6 @@ class Libgit2 { int Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - /// Return the prerelease state of the libgit2 library currently being - /// used. For nightly builds during active development, this will be - /// "alpha". Releases may have a "beta" or release candidate ("rc1", - /// "rc2", etc) prerelease. For a final release, this function returns - /// NULL. - /// - /// @return the name of the prerelease state or NULL - ffi.Pointer git_libgit2_prerelease() { - return _git_libgit2_prerelease(); - } - - late final _git_libgit2_prereleasePtr = - _lookup Function()>>( - 'git_libgit2_prerelease'); - late final _git_libgit2_prerelease = - _git_libgit2_prereleasePtr.asFunction Function()>(); - /// Query compile time options for libgit2. /// /// @return A combination of GIT_FEATURE_* values. @@ -9476,8 +9459,8 @@ class Libgit2 { /// See `git_tag_create()` for rules about valid names. /// /// Note that if the move succeeds, the old reference object will not - /// be valid anymore, and should be freed immediately by the user using - /// `git_reference_free()`. + /// + be valid anymore, and should be freed immediately by the user using + /// + `git_reference_free()`. /// /// @param out New reference object for the updated name. /// @@ -11885,7 +11868,7 @@ class Libgit2 { /// completes, resolve any conflicts and prepare a commit. /// /// For compatibility with git, the repository is put into a merging - /// state. Once the commit is done (or if the user wishes to abort), + /// state. Once the commit is done (or if the uses wishes to abort), /// you should clear this state by calling /// `git_repository_state_cleanup()`. /// @@ -15458,7 +15441,7 @@ class Libgit2 { /// global configuration file. /// /// This method will not guess the path to the xdg compatible - /// config file (`.config/git/config`). + /// config file (.config/git/config). /// /// @param out Pointer to a user-allocated git_buf in which to store the path /// @return 0 if a global configuration file has been found. Its path will be stored in `out`. @@ -15505,8 +15488,8 @@ class Libgit2 { /// Locate the path to the system configuration file /// - /// If `/etc/gitconfig` doesn't exist, it will look for - /// `%PROGRAMFILES%\Git\etc\gitconfig`. + /// If /etc/gitconfig doesn't exist, it will look for + /// %PROGRAMFILES%\Git\etc\gitconfig. /// /// @param out Pointer to a user-allocated git_buf in which to store the path /// @return 0 if a system configuration file has been @@ -15527,7 +15510,7 @@ class Libgit2 { /// Locate the path to the configuration file in ProgramData /// - /// Look for the file in `%PROGRAMDATA%\Git\config` used by portable git. + /// Look for the file in %PROGRAMDATA%\Git\config used by portable git. /// /// @param out Pointer to a user-allocated git_buf in which to store the path /// @return 0 if a ProgramData configuration file has been @@ -16100,8 +16083,8 @@ class Libgit2 { /// Return the current entry and advance the iterator /// - /// The pointers returned by this function are valid until the next call - /// to `git_config_next` or until the iterator is freed. + /// The pointers returned by this function are valid until the iterator + /// is freed. /// /// @param entry pointer to store the entry /// @param iter the iterator @@ -16939,8 +16922,7 @@ class Libgit2 { late final _git_error_clear = _git_error_clearPtr.asFunction(); - /// Set the error message string for this thread, using `printf`-style - /// formatting. + /// Set the error message string for this thread. /// /// This function is public so that custom ODB backends and the like can /// relay an error message through libgit2. Most regular users of libgit2 @@ -16953,31 +16935,7 @@ class Libgit2 { /// /// @param error_class One of the `git_error_t` enum above describing the /// general subsystem that is responsible for the error. - /// @param fmt The `printf`-style format string; subsequent arguments must - /// be the arguments for the format string. - void git_error_set( - int error_class, - ffi.Pointer fmt, - ) { - return _git_error_set( - error_class, - fmt, - ); - } - - late final _git_error_setPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int, ffi.Pointer)>>('git_error_set'); - late final _git_error_set = - _git_error_setPtr.asFunction)>(); - - /// Set the error message string for this thread. This function is like - /// `git_error_set` but takes a static string instead of a `printf`-style - /// format. - /// - /// @param error_class One of the `git_error_t` enum above describing the - /// general subsystem that is responsible for the error. - /// @param string The error message to keep + /// @param string The formatted error message to keep /// @return 0 on success or -1 on failure int git_error_set_str( int error_class, @@ -30729,7 +30687,7 @@ abstract class git_error_t { static const int GIT_ERROR_FILESYSTEM = 30; static const int GIT_ERROR_PATCH = 31; static const int GIT_ERROR_WORKTREE = 32; - static const int GIT_ERROR_SHA = 33; + static const int GIT_ERROR_SHA1 = 33; static const int GIT_ERROR_HTTP = 34; static const int GIT_ERROR_INTERNAL = 35; } @@ -31242,15 +31200,12 @@ class git_status_options extends ffi.Struct { external int version; /// The `show` value is one of the `git_status_show_t` constants that - /// control which files to scan and in what order. The default is - /// `GIT_STATUS_SHOW_INDEX_AND_WORKDIR`. + /// control which files to scan and in what order. @ffi.Int32() external int show1; /// The `flags` value is an OR'ed combination of the - /// `git_status_opt_t` values above. The default is - /// `GIT_STATUS_OPT_DEFAULTS`, which matches git's default - /// behavior. + /// `git_status_opt_t` values above. @ffi.UnsignedInt() external int flags; @@ -32651,8 +32606,6 @@ const int GITERR_WORKTREE = 32; const int GITERR_SHA1 = 33; -const int GIT_ERROR_SHA1 = 33; - const int GIT_IDXENTRY_NAMEMASK = 4095; const int GIT_IDXENTRY_STAGEMASK = 12288; @@ -32757,16 +32710,14 @@ const int GIT_CREDTYPE_SSH_MEMORY = 64; const int GIT_EMAIL_CREATE_OPTIONS_VERSION = 1; -const String LIBGIT2_VERSION = '1.5.0'; +const String LIBGIT2_VERSION = '1.4.3'; const int LIBGIT2_VER_MAJOR = 1; -const int LIBGIT2_VER_MINOR = 5; +const int LIBGIT2_VER_MINOR = 4; -const int LIBGIT2_VER_REVISION = 0; +const int LIBGIT2_VER_REVISION = 3; const int LIBGIT2_VER_PATCH = 0; -const int LIBGIT2_VER_PRERELEASE = 0; - -const String LIBGIT2_SOVERSION = '1.5'; +const String LIBGIT2_SOVERSION = '1.4'; diff --git a/lib/src/util.dart b/lib/src/util.dart index 8ce2caf..d81b8c7 100644 --- a/lib/src/util.dart +++ b/lib/src/util.dart @@ -8,7 +8,7 @@ import 'package:libgit2dart/src/bindings/libgit2_opts_bindings.dart'; import 'package:path/path.dart' as path; import 'package:pub_cache/pub_cache.dart'; -const libgit2Version = '1.5.0'; +const libgit2Version = '1.4.3'; final libDir = path.join('.dart_tool', 'libgit2'); String getLibName() { diff --git a/linux/CMakeLists.txt b/linux/CMakeLists.txt index 64d842a..325acb8 100644 --- a/linux/CMakeLists.txt +++ b/linux/CMakeLists.txt @@ -20,6 +20,6 @@ target_link_libraries(${PLUGIN_NAME} PRIVATE PkgConfig::GTK) # List of absolute paths to libraries that should be bundled with the plugin set(libgit2dart_bundled_libraries - "${CMAKE_CURRENT_SOURCE_DIR}/libgit2-1.5.0.so" + "${CMAKE_CURRENT_SOURCE_DIR}/libgit2-1.4.3.so" PARENT_SCOPE ) diff --git a/linux/libgit2-1.4.3.so b/linux/libgit2-1.4.3.so new file mode 100644 index 0000000..d5f1411 Binary files /dev/null and b/linux/libgit2-1.4.3.so differ diff --git a/linux/libgit2-1.5.0.so b/linux/libgit2-1.5.0.so deleted file mode 100644 index 77a2487..0000000 Binary files a/linux/libgit2-1.5.0.so and /dev/null differ diff --git a/macos/libgit2-1.4.3.dylib b/macos/libgit2-1.4.3.dylib new file mode 100644 index 0000000..28a0046 Binary files /dev/null and b/macos/libgit2-1.4.3.dylib differ diff --git a/macos/libgit2-1.5.0.dylib b/macos/libgit2-1.5.0.dylib deleted file mode 100644 index 105751d..0000000 Binary files a/macos/libgit2-1.5.0.dylib and /dev/null differ diff --git a/macos/libgit2dart.podspec b/macos/libgit2dart.podspec index c9c9408..af9dfa3 100644 --- a/macos/libgit2dart.podspec +++ b/macos/libgit2dart.podspec @@ -4,7 +4,7 @@ # Pod::Spec.new do |s| s.name = 'libgit2dart' - s.version = '1.2.0' + s.version = '1.1.2' s.summary = 'Dart bindings to libgit2.' s.description = <<-DESC Dart bindings to libgit2. @@ -15,7 +15,7 @@ Dart bindings to libgit2. s.source = { :path => '.' } s.source_files = 'Classes/**/*' s.dependency 'FlutterMacOS' - s.vendored_libraries = 'libgit2-1.5.0.dylib' + s.vendored_libraries = 'libgit2-1.4.3.dylib' s.platform = :osx, '10.11' s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' } diff --git a/pubspec.yaml b/pubspec.yaml index f868cae..d28b846 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,7 +2,7 @@ name: libgit2dart description: Dart bindings to libgit2, provides ability to use libgit2 library in Dart and Flutter. -version: 1.2.0 +version: 1.1.2 homepage: https://github.com/SkinnyMind/libgit2dart diff --git a/windows/CMakeLists.txt b/windows/CMakeLists.txt index 128c67f..a653c8a 100644 --- a/windows/CMakeLists.txt +++ b/windows/CMakeLists.txt @@ -19,6 +19,6 @@ target_link_libraries(${PLUGIN_NAME} PRIVATE flutter flutter_wrapper_plugin) # List of absolute paths to libraries that should be bundled with the plugin set(libgit2dart_bundled_libraries - "${CMAKE_CURRENT_SOURCE_DIR}/libgit2-1.5.0.dll" + "${CMAKE_CURRENT_SOURCE_DIR}/libgit2-1.4.3.dll" PARENT_SCOPE ) diff --git a/windows/libgit2-1.5.0.dll b/windows/libgit2-1.4.3.dll similarity index 57% rename from windows/libgit2-1.5.0.dll rename to windows/libgit2-1.4.3.dll index 3c7347b..19ad281 100644 Binary files a/windows/libgit2-1.5.0.dll and b/windows/libgit2-1.4.3.dll differ