add ref content check for files backend
Get series with b4
b4 am Zz3MON9_9DGD6nsy@ArchLinuxVersions newest first · linked by author and title
- v9 Latest9 patches 2 repliesIn review
- v89 patches 3 repliesSuperseded
- v79 patches 5 repliesSuperseded
Earlier versions · 6
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v6 | 9 patches | 18 replies | Superseded | |
| v5 | 9 patches | 35 replies | Superseded | |
| v4 | 5 patches | 11 replies | Superseded | |
| v3 | 4 patches | 10 replies | Superseded | |
| v2 | 4 patches | 28 replies | Superseded | |
| v1 | 4 patches | 15 replies | Superseded |
Patches in v9 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/9 | ref: initialize "fsck_ref_report" with zerorefs/ | +1 | 0 replies | |
| 2/9 | ref: check the full refname instead of basenamerefs/ t/ | +60 | 0 replies | |
| 3/9 | ref: initialize ref name outside of check functionsrefs/ | +13 | 0 replies | |
| 4/9 | ref: support multiple worktrees check for refsbuiltin/ refs.c refs.h +6 more | +90 | 0 replies | |
| 5/9 | ref: port git-fsck(1) regular refs check for files backendDocumentation/ fsck.h refs/ +1 more | +156 | 0 replies | |
| 6/9 | ref: add more strict checks for regular refsDocumentation/ fsck.h refs.c +3 more | +96 | 0 replies | |
| 7/9 | ref: add basic symref content check for files backendDocumentation/ fsck.h refs/ +1 more | +155 | 0 replies | |
| 8/9 | ref: check whether the target of the symref is a refDocumentation/ fsck.h refs/ +1 more | +51 | 0 replies | |
| 9/9 | ref: add symlink ref content check for files backendDocumentation/ fsck.h refs/ +1 more | +182 | 0 replies |
Reviews trailers per patch
None of the 9 patches has a Reviewed-by or Acked-by.
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v9 0/9] add ref content check for files backend
Hi All:
This version fixes two problems:
1. Remove unnecessary space.
2. Drop extra "strerror(errno)".
Thanks,
Jialuo
shejialuo (9):
ref: initialize "fsck_ref_report" with zero
ref: check the full refname instead of basename
ref: initialize ref name outside of check functions
ref: support multiple worktrees check for refs
ref: port git-fsck(1) regular refs check for files backend
ref: add more strict checks for regular refs
ref: add basic symref content check for files backend
ref: check whether the target of the symref is a ref
ref: add symlink ref content check for files backend
Documentation/fsck-msgids.txt | 35 +++ builtin/refs.c | 10 +- fsck.h | 6 + refs.c | 7 +- refs.h | 3 +- refs/debug.c | 5 +- refs/files-backend.c | 194 +++++++++++- refs/packed-backend.c | 8 +- refs/refs-internal.h | 5 +- refs/reftable-backend.c | 3 +- t/t0602-reffiles-fsck.sh | 576 ++++++++++++++++++++++++++++++++-- 11 files changed, 790 insertions(+), 62 deletions(-)
Range-diff against v8:
1: bfb2a21af4 = 1: bfb2a21af4 ref: initialize "fsck_ref_report" with zero
2: 9efc83f7ea = 2: 9efc83f7ea ref: check the full refname instead of basename
3: 5ea7d18203 = 3: 5ea7d18203 ref: initialize ref name outside of check functions
4: cb4669b64d = 4: cb4669b64d ref: support multiple worktrees check for refs
5: c6c128c922 ! 5: d6188063d9 ref: port git-fsck(1) regular refs check for files backend
@@ refs/files-backend.c: typedef int (*files_fsck_refs_fn)(struct ref_store *ref_st
+ if (S_ISLNK(iter->st.st_mode))
+ goto cleanup;
+
-+ if (strbuf_read_file(&ref_content, iter->path.buf, 0) < 0 ) {
++ if (strbuf_read_file(&ref_content, iter->path.buf, 0) < 0) {
+ /*
+ * Ref file could be removed by another concurrent process. We should
+ * ignore this error and continue to the next ref.
@@ refs/files-backend.c: typedef int (*files_fsck_refs_fn)(struct ref_store *ref_st
+ if (errno == ENOENT)
+ goto cleanup;
+
-+ ret = error_errno(_("cannot read ref file '%s': %s"),
-+ iter->path.buf, strerror(errno));
++ ret = error_errno(_("cannot read ref file '%s'"), iter->path.buf);
+ goto cleanup;
+ }
+
6: 911fa42717 = 6: e5e97ba3ad ref: add more strict checks for regular refs
7: 7aa6a99206 = 7: 1dec0a56d2 ref: add basic symref content check for files backend
8: dbb0787ad1 = 8: dcc4a02102 ref: check whether the target of the symref is a ref
9: a6d85b4864 ! 9: fc10862f6f ref: add symlink ref content check for files backend @@ refs/files-backend.c: static int files_fsck_refs_content(struct ref_store *ref_s
goto cleanup;
+ }
- if (strbuf_read_file(&ref_content, iter->path.buf, 0) < 0 ) {
+ if (strbuf_read_file(&ref_content, iter->path.buf, 0) < 0) {
/*
@@ refs/files-backend.c: static int files_fsck_refs_content(struct ref_store *ref_store,
goto cleanup;
Signature · 1 line
2.47.0