mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-05 04:39:07 -04:00
refactor: use nullable strings instead of empty in arguments
This commit is contained in:
parent
5401717713
commit
b5561212e0
7 changed files with 57 additions and 62 deletions
|
@ -13,12 +13,11 @@ import '../util.dart';
|
|||
Pointer<git_oid> stash(
|
||||
Pointer<git_repository> repo,
|
||||
Pointer<git_signature> stasher,
|
||||
String message,
|
||||
String? message,
|
||||
int flags,
|
||||
) {
|
||||
final out = calloc<git_oid>();
|
||||
final messageC =
|
||||
message.isNotEmpty ? message.toNativeUtf8().cast<Int8>() : nullptr;
|
||||
final messageC = message?.toNativeUtf8().cast<Int8>() ?? nullptr;
|
||||
final error = libgit2.git_stash_save(out, repo, stasher, messageC, flags);
|
||||
|
||||
if (error < 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue