Skip to content

Commit 6af23ac

Browse files
pks-tgitster
authored andcommitted
reftable: decouple from Git codebase by pulling in "compat/posix.h"
The reftable library includes "git-compat-util.h" in order to get a POSIX-like programming environment that papers over various differences between platforms. The header also brings with it a couple of helpers specific to the Git codebase though, and over time we have started to use these helpers in the reftable library, as well. This makes it very hard to use the reftable library as a standalone library without the rest of the Git codebase, so other libraries like e.g. libgit2 cannot easily use it. But now that we have removed all calls to Git-specific functionality and have split out "compat/posix.h" as a separate header we can address this. Stop including "git-compat-util.h" and instead include "compat/posix.h" to finalize the decoupling of the reftable library from the rest of the Git codebase. The only bits which remain specific to Git are "system.h" and "system.c", which projects will have to provide. Signed-off-by: Patrick Steinhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 75a044f commit 6af23ac

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

reftable/system.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#include "../git-compat-util.h"
2+
13
#include "system.h"
24
#include "basics.h"
35
#include "reftable-error.h"

reftable/system.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ license that can be found in the LICENSE file or at
1111

1212
/* This header glues the reftable library to the rest of Git */
1313

14-
#include "git-compat-util.h"
14+
#include "compat/posix.h"
1515
#include "compat/zlib-compat.h"
1616

1717
/*

0 commit comments

Comments
 (0)