1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
From e26c4d29ca2b62a31706ef9c00fcab018a9cd905 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
Date: Fri, 4 Aug 2023 08:29:09 +0200
Subject: [PATCH] Improve compatibility with libgit2
This fixes various struct layout mismatches with libgit 1.7.0. These
mismatches actually results in test failures on *some* architectures.
See also: https://gitlab.com/guile-git/guile-git/-/merge_requests/32
---
git/structs.scm | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/git/structs.scm b/git/structs.scm
index ca51728..2c5282c 100644
--- a/git/structs.scm
+++ b/git/structs.scm
@@ -135,7 +135,8 @@
;;; git-time
(define %time (bs:struct `((time ,int64) ;; time in seconds since epoch
- (offset ,int)))) ;; timezone offset, in minutes
+ (offset ,int) ;; timezone offset, in minutes
+ (sign ,uint8)))) ;; indicator for questionable '-0000' offsets in signature
(define-record-type <time>
(%make-time bytestructure)
@@ -225,7 +226,9 @@
(bs:struct `((version ,unsigned-int)
(status-show ,int)
(flags ,unsigned-int)
- (pathspec ,%strarray))))
+ (pathspec ,%strarray)
+ (baseline ,(bs:pointer void))
+ (rename-threshold ,uint16))))
(define %diff-file
(bs:struct `((oid ,(bs:vector 20 uint8))
@@ -486,7 +489,7 @@
(define %config-entry (bs:struct `((name ,(bs:pointer uint8)) ; char *
(value ,(bs:pointer uint8)) ; char *
- (include-depth ,uint64)
+ (include-depth ,unsigned-int)
(level ,int) ; git_config_level_t
(free ,(bs:pointer int))
(payload ,(bs:pointer int)))))
@@ -637,6 +640,7 @@ type to 'specified for this to take effect."
(push-update-reference ,(bs:pointer uint8))
(push-negotiation ,(bs:pointer uint8))
(transport ,(bs:pointer uint8))
+ (remote-ready ,(bs:pointer uint8))
(payload ,(bs:pointer uint8))
;; libgit2 1.0 added this field, which is missing from 0.28.5,
@@ -670,6 +674,8 @@ type to 'specified for this to take effect."
(update-fetchhead ,int)
(download-tags ,int)
(proxy-opts ,%proxy-options)
+ (depth ,int)
+ (follow-redir ,int)
(custom-headers ,%strarray))))
(define-record-type <fetch-options>
|