Skip to content

reftable: stop using Git subsystems

Patrick Steinhardt git 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest7 patches 2 repliesIn review
  2. v27 patches 11 repliesSuperseded
  3. v17 patches 6 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7reftable/system: move "dir.h" to its only userreftable/system.h t/unit-tests/t-reftable-stack.c+1 -10 replies
2/7reftable: explicitly handle hash format IDsreftable/basics.h reftable/reader.c reftable/writer.c+29 -50 replies
3/7reftable/system: stop depending on "hash.h"refs/reftable-backend.c reftable/basics.c reftable/basics.h +22 more+166 -1430 replies
4/7reftable/stack: stop using `fsync_component()` directlyrefs/reftable-backend.c reftable/reftable-writer.h reftable/stack.c+45 -170 replies
5/7reftable/system: provide thin wrapper for tempfile subsystemMakefile reftable/stack.c reftable/system.c +1 more+114 -350 replies
6/7reftable/stack: drop only use of `get_locked_file_path()`reftable/stack.c+9 -30 replies
7/7reftable/system: provide thin wrapper for lockfile subsystemreftable/stack.c reftable/system.c reftable/system.h +5 more+154 -370 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 0/7] reftable: stop using Git subsystems

Hi,

this is the third version of my patch series that continues to detangle the reftable library from the Git codebase.

There is only a single change compared to v2, which is a clarification that tmpfile_rename() also deactivates the underlying tmpfile.

Thanks!

Patrick

Patrick Steinhardt (7):
reftable/system: move "dir.h" to its only user
reftable: explicitly handle hash format IDs reftable/system: stop depending on "hash.h" reftable/stack: stop using fsync_component() directly reftable/system: provide thin wrapper for tempfile subsystem reftable/stack: drop only use of get_locked_file_path() reftable/system: provide thin wrapper for lockfile subsystem

 Makefile                            |   1 +
 refs/reftable-backend.c             |  19 +++-
 reftable/basics.c                   |  13 ++-
 reftable/basics.h                   |  10 +-
 reftable/merged.c                   |   4 +-
 reftable/merged.h                   |   3 +-
 reftable/reader.c                   |  14 ++-
 reftable/reader.h                   |   4 +-
 reftable/reftable-basics.h          |  13 +++
 reftable/reftable-merged.h          |   4 +-
 reftable/reftable-reader.h          |   2 +-
 reftable/reftable-record.h          |  12 +-
 reftable/reftable-writer.h          |   8 +-
 reftable/stack.c                    | 171 ++++++++++++++--------------
 reftable/system.c                   | 126 ++++++++++++++++++++
 reftable/system.h                   |  89 ++++++++++++++-
 reftable/writer.c                   |  20 +++-
 t/helper/test-reftable.c            |   4 +-
 t/unit-tests/lib-reftable.c         |   5 +-
 t/unit-tests/lib-reftable.h         |   2 +-
 t/unit-tests/t-reftable-block.c     |  41 +++----
 t/unit-tests/t-reftable-merged.c    |  26 ++---
 t/unit-tests/t-reftable-pq.c        |   3 +-
 t/unit-tests/t-reftable-reader.c    |   4 +-
 t/unit-tests/t-reftable-readwrite.c |  41 +++----
 t/unit-tests/t-reftable-record.c    |  59 +++++-----
 t/unit-tests/t-reftable-stack.c     |  37 +++---
 27 files changed, 506 insertions(+), 229 deletions(-)
 create mode 100644 reftable/system.c

Range-diff against v2:

1:  2b7d4e28529 = 1:  2b7d4e28529 reftable/system: move "dir.h" to its only user
2:  38cfe85bf5b = 2:  38cfe85bf5b reftable: explicitly handle hash format IDs
3:  745c1a070dd = 3:  745c1a070dd reftable/system: stop depending on "hash.h"
4:  7782652b975 = 4:  7782652b975 reftable/stack: stop using `fsync_component()` directly
5:  b15daefbc83 ! 5:  430be1045d6 reftable/system: provide thin wrapper for tempfile subsystem

@@ reftable/system.h: license that can be found in the LICENSE file or at
+
+/*
+ * Rename the temporary file to the provided path. The temporary file must be
-+ * active. Return 0 on success, a reftable error code on error. ++ * active. Return 0 on success, a reftable error code on error. Deactivates the ++ * temporary file.
+ */
+int tmpfile_rename(struct reftable_tmpfile *t, const char *path);

6:  83949837a29 = 6:  b9ffdc605b9 reftable/stack: drop only use of `get_locked_file_path()`
7:  80fe5bc5e10 = 7:  e1ac1cc2e67 reftable/system: provide thin wrapper for lockfile subsystem
Signature · 1 line
2.47.0.274.g962d0b743d.dirty