Skip to content

Commit 4b65c47

Browse files
committed
Disable owner validation
1 parent d784cb3 commit 4b65c47

3 files changed

Lines changed: 10 additions & 1 deletion

File tree

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Type: Package
22
Package: gert
33
Title: Simple Git Client for R
4-
Version: 2.4.0
4+
Version: 2.4.1
55
Authors@R: c(
66
person("Jeroen", "Ooms", role = c("aut", "cre"), email = "jeroenooms@gmail.com",
77
comment = c(ORCID = "0000-0002-4035-0289")),

NEWS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# gert 2.4.1
2+
3+
- Disable owner validation with recent libgit2 versions for backward compatibility
4+
15
# gert 2.4.0
26

37
- Linux: default to system libgit2 on Ubuntu 24 and up.

src/init.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include <R_ext/Rdynload.h>
44
#include <R_ext/Visibility.h>
55
#include <git2.h>
6+
#include "utils.h"
67

78
#ifdef _WIN32
89
#include <sys/stat.h>
@@ -188,6 +189,10 @@ static const R_CallMethodDef CallEntries[] = {
188189

189190
attribute_visible void R_init_gert(DllInfo *dll) {
190191
git_libgit2_init();
192+
#if AT_LEAST_LIBGIT2(1, 5)
193+
/* Do not error on repos owned by another uid (e.g. docker/CI mounts) */
194+
git_libgit2_opts(GIT_OPT_SET_OWNER_VALIDATION, 0);
195+
#endif
191196
#ifdef _WIN32
192197
char homedir[8000] = {0};
193198
const char *userprofile = getenv("USERPROFILE");

0 commit comments

Comments
 (0)