diff --git a/flake.lock b/flake.lock index 9398ccd..75bc3cc 100644 --- a/flake.lock +++ b/flake.lock @@ -68,16 +68,16 @@ "libgit2": { "flake": false, "locked": { - "lastModified": 1703195592, - "narHash": "sha256-yCyV1Bn97V7CwppgdvCSu7nTYn2pQ1qN+xzY/txI2vM=", - "owner": "u-quark", + "lastModified": 1721209236, + "narHash": "sha256-tDUQi+s8sxJ30SmUH7Ln9WmDz5jGatlgKumjwi7KnCo=", + "owner": "libgit2", "repo": "libgit2", - "rev": "17f7213f88c7272d1503479c9cac56abeb3a2a8f", + "rev": "503b66cf00ad7dca940148529f60b1a409ccc462", "type": "github" }, "original": { - "owner": "u-quark", - "ref": "gg", + "owner": "libgit2", + "ref": "503b66cf", "repo": "libgit2", "type": "github" } diff --git a/flake.nix b/flake.nix index ddc2a0b..b177964 100644 --- a/flake.nix +++ b/flake.nix @@ -8,7 +8,7 @@ flake = false; }; libgit2 = { - url = "github:u-quark/libgit2?ref=gg"; + url = "github:libgit2/libgit2?ref=503b66cf"; flake = false; }; vty = { diff --git a/src/GG/Repo/Commit.hs b/src/GG/Repo/Commit.hs index 6661376..05be90d 100644 --- a/src/GG/Repo/Commit.hs +++ b/src/GG/Repo/Commit.hs @@ -76,7 +76,7 @@ getSignature commitContent program keyM = do createCommit :: G.Repository -> G.Signature -> String -> G.Tree -> [G.Commit] -> IO CreateCommitResult createCommit repo author message tree parents = do signConfig <- getSignConfig repo - committer <- G.signatureDefaultCommitter repo + (_author, committer) <- G.signatureDefaultFromEnv repo commitContent <- G.commitCreateBuffer repo author committer "UTF-8" message tree parents signatureME <- case signConfig of diff --git a/src/Libgit2/Signature.chs b/src/Libgit2/Signature.chs index 6933c75..bdcb73a 100644 --- a/src/Libgit2/Signature.chs +++ b/src/Libgit2/Signature.chs @@ -20,8 +20,7 @@ module Libgit2.Signature , signatureName , signatureEmail , signatureWhen - , signatureDefaultAuthor - , signatureDefaultCommitter + , signatureDefaultFromEnv ) where {#import Libgit2.Types#} @@ -53,6 +52,4 @@ signatureWhen (Signature fp) = pure $ gitToLocalTime time offset ) -{#fun signature_default_author as signatureDefaultAuthor { alloca- `Signature' peekNewSignature*, `Repository' } -> `Int' checkReturnCode*-#} - -{#fun signature_default_committer as signatureDefaultCommitter { alloca- `Signature' peekNewSignature*, `Repository' } -> `Int' checkReturnCode*-#} +{#fun signature_default_from_env as signatureDefaultFromEnv { alloca- `Signature' peekNewSignature*, alloca- `Signature' peekNewSignature*, `Repository' } -> `Int' checkReturnCode*-#}