git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[GSoC][PATCH v4 7/7] fsck: add ref content check for files backend

From
shejialuo <shejialuo@gmail.com>
Date
Jun 19, 2024, 07:44 UTC
Message-ID
<ZnKMY4VdHKHAMNY6@ArchLinux>
In-Reply-To
<ZnKKy52QFO2UhqM6@ArchLinux>

Enhance the git-fsck(1) command by adding a check for reference content in the files backend. The new functionality ensures that symrefs, real symbolic link and regular refs are validated correctly.

In order to check the trailing content of the regular refs, add a new parameter `trailing` to `parse_loose_ref_contents`.

For symrefs, `parse_loose_ref_contents` will set the "referent". However, symbolic link could be either absolute or relative. Use "strbuf_add_real_path" to read the symbolic link and convert the relative path to absolute path. Then use "skip_prefix" to make it align with symref "referent".

Thus, the symrefs and symbolic links could share the same interface. Add a new function "files_fsck_symref_target" which aims at checking the following things:

1. whether the pointee is under the `refs/` directory.
2. whether the pointee name is correct.
3. whether the pointee path is a wrong type in filesystem.
Last, add the following FSCK MESSAGEs:
1. "badRefContent(ERROR)": A ref has a bad content
2. "badSymrefPointee(ERROR)": The pointee of a symref is bad.
3. "trailingRefContent(WARN)": A ref content has trailing contents.
Mentored-by: Patrick Steinhardt <ps@pks.im>
Mentored-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: shejialuo <shejialuo@gmail.com>
---
 Documentation/fsck-msgids.txt |   9 +++
 fsck.h                        |   3 +
 refs.c                        |   2 +-
 refs/files-backend.c          | 145 +++++++++++++++++++++++++++++++++-
 refs/refs-internal.h          |   5 +-
 t/t0602-reffiles-fsck.sh      | 110 ++++++++++++++++++++++++++
 6 files changed, 269 insertions(+), 5 deletions(-)
diff --git a/Documentation/fsck-msgids.txt b/Documentation/fsck-msgids.txt
index dab4012246..b1630a478b 100644
--- a/Documentation/fsck-msgids.txt
+++ b/Documentation/fsck-msgids.txt
@@ -19,9 +19,15 @@
 `badParentSha1`::
 	(ERROR) A commit object has a bad parent sha1.
 
+`badRefContent`::
+	(ERROR) A ref has a bad content.
+
 `badRefName`::
 	(ERROR) A ref has a bad name.
 
+`badSymrefPointee`::
+	(ERROR) The pointee of a symref is bad.
+
 `badTagName`::
 	(INFO) A tag has an invalid format.
 
@@ -167,6 +173,9 @@
 `nullSha1`::
 	(WARN) Tree contains entries pointing to a null sha1.
 
+`trailingRefContent`::
+	(WARN) A ref content has trailing contents.
+
 `treeNotSorted`::
 	(ERROR) A tree is not properly sorted.
 
diff --git a/fsck.h b/fsck.h
index f26dec2ea4..8afee05f20 100644
--- a/fsck.h
+++ b/fsck.h
@@ -32,6 +32,8 @@ enum fsck_msg_type {
 	FUNC(BAD_OBJECT_SHA1, ERROR) \
 	FUNC(BAD_PARENT_SHA1, ERROR) \
 	FUNC(BAD_REF_NAME, ERROR) \
+	FUNC(BAD_REF_CONTENT, ERROR) \
+	FUNC(BAD_SYMREF_POINTEE, ERROR) \
 	FUNC(BAD_TIMEZONE, ERROR) \
 	FUNC(BAD_TREE, ERROR) \
 	FUNC(BAD_TREE_SHA1, ERROR) \
@@ -72,6 +74,7 @@ enum fsck_msg_type {
 	FUNC(HAS_DOTDOT, WARN) \
 	FUNC(HAS_DOTGIT, WARN) \
 	FUNC(NULL_SHA1, WARN) \
+	FUNC(TRAILING_REF_CONTENT, WARN) \
 	FUNC(ZERO_PADDED_FILEMODE, WARN) \
 	FUNC(NUL_IN_COMMIT, WARN) \
 	FUNC(LARGE_PATHNAME, WARN) \
diff --git a/refs.c b/refs.c
index cb3b8ec36a..5fc34d39b1 100644
--- a/refs.c
+++ b/refs.c
@@ -1744,7 +1744,7 @@ static int refs_read_special_head(struct ref_store *ref_store,
 	}
 
 	result = parse_loose_ref_contents(content.buf, oid, referent, type,
-					  failure_errno);
+					  failure_errno, NULL);
 
 done:
 	strbuf_release(&full_path);
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 5bc233b524..3b8e76dab5 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -1,4 +1,5 @@
 #include "../git-compat-util.h"
+#include "../abspath.h"
 #include "../copy.h"
 #include "../environment.h"
 #include "../gettext.h"
@@ -551,7 +552,7 @@ static int read_ref_internal(struct ref_store *ref_store, const char *refname,
 	strbuf_rtrim(&sb_contents);
 	buf = sb_contents.buf;
 
-	ret = parse_loose_ref_contents(buf, oid, referent, type, &myerr);
+	ret = parse_loose_ref_contents(buf, oid, referent, type, &myerr, NULL);
 
 out:
 	if (ret && !myerr)
@@ -587,7 +588,7 @@ static int files_read_symbolic_ref(struct ref_store *ref_store, const char *refn
 
 int parse_loose_ref_contents(const char *buf, struct object_id *oid,
 			     struct strbuf *referent, unsigned int *type,
-			     int *failure_errno)
+			     int *failure_errno, const char **trailing)
 {
 	const char *p;
 	if (skip_prefix(buf, "ref:", &buf)) {
@@ -609,6 +610,10 @@ int parse_loose_ref_contents(const char *buf, struct object_id *oid,
 		*failure_errno = EINVAL;
 		return -1;
 	}
+
+	if (trailing)
+		*trailing = p;
+
 	return 0;
 }
 
@@ -3435,6 +3440,141 @@ static int files_fsck_refs_name(struct fsck_options *o,
 	return ret;
 }
 
+/*
+ * Check the symref "pointee_name" and "pointee_path". The caller should
+ * make sure that "pointee_path" is absolute. For symbolic ref, "pointee_name"
+ * would be the content after "refs:". For symblic link, "pointee_name" would
+ * be the relative path agaignst "gitdir".
+ */
+static int files_fsck_symref_target(struct fsck_options *o,
+				    const char *refname,
+				    const char *pointee_name,
+				    const char *pointee_path)
+{
+	const char *p = NULL;
+	struct stat st;
+	int ret = 0;
+
+	if (!skip_prefix(pointee_name, "refs/", &p)) {
+
+		ret = fsck_refs_report(o, refname,
+				       FSCK_MSG_BAD_SYMREF_POINTEE,
+				       "point to target out of refs hierarchy");
+		goto out;
+	}
+
+	if (check_refname_format(pointee_name, 0)) {
+		ret = fsck_refs_report(o, refname,
+				       FSCK_MSG_BAD_SYMREF_POINTEE,
+				       "point to invalid refname");
+	}
+
+	if (lstat(pointee_path, &st) < 0)
+		goto out;
+
+	if (!S_ISREG(st.st_mode) && !S_ISLNK(st.st_mode)) {
+		ret = fsck_refs_report(o, refname,
+				       FSCK_MSG_BAD_SYMREF_POINTEE,
+				       "point to invalid target");
+		goto out;
+	}
+out:
+	return ret;
+}
+
+static int files_fsck_refs_content(struct fsck_options *o,
+				   const char *gitdir,
+				   const char *refs_check_dir,
+				   struct dir_iterator *iter)
+{
+	struct strbuf pointee_path = STRBUF_INIT,
+		      ref_content = STRBUF_INIT,
+		      abs_gitdir = STRBUF_INIT,
+		      referent = STRBUF_INIT,
+		      refname = STRBUF_INIT;
+	const char *trailing = NULL;
+	int failure_errno = 0;
+	unsigned int type = 0;
+	struct object_id oid;
+	int ret = 0;
+
+	strbuf_addf(&refname, "%s/%s", refs_check_dir, iter->relative_path);
+
+	/*
+	 * If the file is a symlink, we need to only check the connectivity
+	 * of the destination object.
+	 */
+	if (S_ISLNK(iter->st.st_mode)) {
+		const char *pointee_name = NULL;
+
+		strbuf_add_real_path(&pointee_path, iter->path.buf);
+
+		strbuf_add_absolute_path(&abs_gitdir, gitdir);
+		strbuf_normalize_path(&abs_gitdir);
+		if (!is_dir_sep(abs_gitdir.buf[abs_gitdir.len - 1]))
+			strbuf_addch(&abs_gitdir, '/');
+
+		if (!skip_prefix(pointee_path.buf,
+				 abs_gitdir.buf, &pointee_name)) {
+			ret = fsck_refs_report(o, refname.buf,
+					       FSCK_MSG_BAD_SYMREF_POINTEE,
+					       "point to target outside gitdir");
+			goto clean;
+		}
+
+		ret = files_fsck_symref_target(o, refname.buf, pointee_name,
+					       pointee_path.buf);
+		goto clean;
+	}
+
+	if (strbuf_read_file(&ref_content, iter->path.buf, 0) < 0) {
+		ret = error_errno(_("%s/%s: unable to read the ref"),
+				  refs_check_dir, iter->relative_path);
+		goto clean;
+	}
+
+	if (parse_loose_ref_contents(ref_content.buf, &oid,
+				     &referent, &type,
+				     &failure_errno, &trailing)) {
+		ret = fsck_refs_report(o, refname.buf,
+				       FSCK_MSG_BAD_REF_CONTENT,
+				       "invalid ref content");
+		goto clean;
+	}
+
+	/*
+	 * If the ref is a symref, we need to check the destination name and
+	 * connectivity.
+	 */
+	if (referent.len && (type & REF_ISSYMREF)) {
+		strbuf_addf(&pointee_path, "%s/%s", gitdir, referent.buf);
+		strbuf_rtrim(&referent);
+
+		ret = files_fsck_symref_target(o, refname.buf, referent.buf,
+					       pointee_path.buf);
+		goto clean;
+	} else {
+		/*
+		 * Only regular refs could have a trailing garbage. Should
+		 * be reported as a warning.
+		 */
+		if (trailing && (*trailing != '\0' && *trailing != '\n')) {
+			ret = fsck_refs_report(o, refname.buf,
+					       FSCK_MSG_TRAILING_REF_CONTENT,
+					       "trailing garbage in ref");
+			goto clean;
+		}
+	}
+
+clean:
+	strbuf_release(&abs_gitdir);
+	strbuf_release(&pointee_path);
+	strbuf_release(&refname);
+	strbuf_release(&ref_content);
+	strbuf_release(&referent);
+	return ret;
+}
+
 static int files_fsck_refs_dir(struct ref_store *ref_store,
 			       struct fsck_options *o,
 			       const char *refs_check_dir,
@@ -3487,6 +3627,7 @@ static int files_fsck_refs(struct ref_store *ref_store,
 	int ret;
 	files_fsck_refs_fn fsck_refs_fns[]= {
 		files_fsck_refs_name,
+		files_fsck_refs_content,
 		NULL
 	};
 
diff --git a/refs/refs-internal.h b/refs/refs-internal.h
index 280acb7f9e..1126c6102a 100644
--- a/refs/refs-internal.h
+++ b/refs/refs-internal.h
@@ -709,11 +709,12 @@ struct ref_store {
 
 /*
  * Parse contents of a loose ref file. *failure_errno maybe be set to EINVAL for
- * invalid contents.
+ * invalid contents. Also *trailing is set to the first character after the
+ * refname or NULL if the referent is not empty.
  */
 int parse_loose_ref_contents(const char *buf, struct object_id *oid,
 			     struct strbuf *referent, unsigned int *type,
-			     int *failure_errno);
+			     int *failure_errno, const char **trailing);
 
 /*
  * Fill in the generic part of refs and add it to our collection of
diff --git a/t/t0602-reffiles-fsck.sh b/t/t0602-reffiles-fsck.sh
index b2db58d2c6..35bf40ee64 100755
--- a/t/t0602-reffiles-fsck.sh
+++ b/t/t0602-reffiles-fsck.sh
@@ -98,4 +98,114 @@ test_expect_success 'ref name check should be adapted into fsck messages' '
 	)
 '
 
+test_expect_success 'regular ref content should be checked' '
+	test_when_finished "rm -rf repo" &&
+	git init repo &&
+	branch_dir_prefix=.git/refs/heads &&
+	tag_dir_prefix=.git/refs/tags &&
+	(
+		cd repo &&
+		git commit --allow-empty -m initial &&
+		git checkout -b branch-1 &&
+		git tag tag-1 &&
+		git commit --allow-empty -m second &&
+		git checkout -b branch-2 &&
+		git tag tag-2 &&
+		git checkout -b a/b/tag-2
+	) &&
+	(
+		cd repo &&
+		printf "%s garbage" "$(git rev-parse branch-1)" > $branch_dir_prefix/branch-1-garbage &&
+		git fsck 2>err &&
+		cat >expect <<-EOF &&
+		warning: refs/heads/branch-1-garbage: trailingRefContent: trailing garbage in ref
+		EOF
+		rm $branch_dir_prefix/branch-1-garbage &&
+		test_cmp expect err
+	) &&
+	(
+		cd repo &&
+		printf "%s garbage" "$(git rev-parse tag-1)" > $tag_dir_prefix/tag-1-garbage &&
+		test_must_fail git -c fsck.trailingRefContent=error fsck 2>err &&
+		cat >expect <<-EOF &&
+		error: refs/tags/tag-1-garbage: trailingRefContent: trailing garbage in ref
+		EOF
+		rm $tag_dir_prefix/tag-1-garbage &&
+		test_cmp expect err
+	) &&
+	(
+		cd repo &&
+		printf "%s    " "$(git rev-parse tag-2)" > $tag_dir_prefix/tag-2-garbage &&
+		git fsck 2>err &&
+		cat >expect <<-EOF &&
+		warning: refs/tags/tag-2-garbage: trailingRefContent: trailing garbage in ref
+		EOF
+		rm $tag_dir_prefix/tag-2-garbage &&
+		test_cmp expect err
+	) &&
+	(
+		cd repo &&
+		printf "xfsazqfxcadas" > $tag_dir_prefix/tag-2-bad &&
+		test_must_fail git refs verify 2>err &&
+		cat >expect <<-EOF &&
+		error: refs/tags/tag-2-bad: badRefContent: invalid ref content
+		EOF
+		rm $tag_dir_prefix/tag-2-bad &&
+		test_cmp expect err
+	) &&
+	(
+		cd repo &&
+		printf "xfsazqfxcadas" > $branch_dir_prefix/a/b/branch-2-bad &&
+		test_must_fail git refs verify 2>err &&
+		cat >expect <<-EOF &&
+		error: refs/heads/a/b/branch-2-bad: badRefContent: invalid ref content
+		EOF
+		rm $branch_dir_prefix/a/b/branch-2-bad &&
+		test_cmp expect err
+	)
+'
+
+test_expect_success 'symbolic ref content should be checked' '
+	test_when_finished "rm -rf repo" &&
+	git init repo &&
+	branch_dir_prefix=.git/refs/heads &&
+	tag_dir_prefix=.git/refs/tags &&
+	(
+		cd repo &&
+		git commit --allow-empty -m initial &&
+		git checkout -b branch-1 &&
+		git tag tag-1
+	) &&
+	(
+		cd repo &&
+		printf "ref: refs/heads/.branch" > $branch_dir_prefix/branch-2-bad &&
+		test_must_fail git refs verify 2>err &&
+		cat >expect <<-EOF &&
+		error: refs/heads/branch-2-bad: badSymrefPointee: point to invalid refname
+		EOF
+		rm $branch_dir_prefix/branch-2-bad &&
+		test_cmp expect err
+	) &&
+	(
+		cd repo &&
+		printf "ref: refs/heads" > $branch_dir_prefix/branch-2-bad &&
+		test_must_fail git refs verify 2>err &&
+		cat >expect <<-EOF &&
+		error: refs/heads/branch-2-bad: badSymrefPointee: point to invalid target
+		EOF
+		rm $branch_dir_prefix/branch-2-bad &&
+		test_cmp expect err
+	) &&
+	(
+		cd repo &&
+		printf "ref: logs/maint-v2.45" > $branch_dir_prefix/branch-2-bad &&
+		test_must_fail git refs verify 2>err &&
+		cat >expect <<-EOF &&
+		error: refs/heads/branch-2-bad: badSymrefPointee: point to target out of refs hierarchy
+		EOF
+		rm $branch_dir_prefix/branch-2-bad &&
+		test_cmp expect err
+	)
+'
+
 test_done
-- 
2.45.2
Previous: shejialuoNext: shejialuo
Message 58 of 282 in “ref consistency check infra setup”
  1. shejialuoMay 30, 2024
  2. [GSoC][PATCH 1/2] refs: setup ref consistency check infrastructureshejialuo, May 30, 2024
  3. Junio C HamanoMay 31, 2024
  4. shejialuoMay 31, 2024
  5. Patrick SteinhardtJun 3, 2024
  6. Karthik NayakJun 3, 2024
  7. Eric SunshineJun 3, 2024
  8. [GSoC][PATCH 2/2] refs: add name and content check for file backendshejialuo, May 30, 2024
  9. Junio C HamanoMay 31, 2024
  10. shejialuoMay 31, 2024
  11. Eric SunshineMay 31, 2024
  12. Patrick SteinhardtJun 3, 2024
  13. [GSoC][PATCH v2 0/7] ref consistency check infra setupshejialuo, Jun 12, 2024
  14. [GSoC][PATCH v2 1/7] fsck: add refs check interfaces to interface with fsck error levelsshejialuo, Jun 12, 2024
  15. [GSoC][PATCH v2 2/7] refs: set up ref consistency check infrastructureshejialuo, Jun 12, 2024
  16. Karthik NayakJun 15, 2024
  17. [GSoC][PATCH v2 3/7] builtin/refs: add verify subcommandshejialuo, Jun 12, 2024
  18. Karthik NayakJun 15, 2024
  19. [GSoC][PATCH v2 4/7] builtin/fsck: add `git-refs verify` child processshejialuo, Jun 12, 2024
  20. Karthik NayakJun 15, 2024
  21. [GSoC][PATCH v2 5/7] files-backend: add unified interface for refs scanningshejialuo, Jun 12, 2024
  22. Karthik NayakJun 15, 2024
  23. shejialuoJun 18, 2024
  24. [GSoC][PATCH v2 6/7] fsck: add ref name check for files backendshejialuo, Jun 12, 2024
  25. [GSoC][PATCH v2 7/7] fsck: add ref content check for files backendshejialuo, Jun 12, 2024
  26. Junio C HamanoJun 13, 2024
  27. shejialuoJun 14, 2024
  28. Junio C HamanoJun 14, 2024
  29. jialuo sheJun 14, 2024
  30. Junio C HamanoJun 14, 2024
  31. shejialuoJun 12, 2024
  32. [GSoC][PATCH v3 0/7] ref consistency check infra setupshejialuo, Jun 18, 2024
  33. Junio C HamanoJun 18, 2024
  34. jialuo sheJun 18, 2024
  35. [GSoC][PATCH v3 1/7] fsck: add refs check interfaces to interface with fsck error levelsshejialuo, Jun 18, 2024
  36. Karthik NayakJun 18, 2024
  37. shejialuoJun 18, 2024
  38. Junio C HamanoJun 18, 2024
  39. jialuo sheJun 18, 2024
  40. shejialuoJun 19, 2024
  41. 2/7 refs: set up ref consistency check infrastructureshejialuo, Jun 18, 2024
  42. 3/7 builtin/refs: add verify subcommandshejialuo, Jun 18, 2024
  43. Karthik NayakJun 18, 2024
  44. shejialuoJun 18, 2024
  45. 4/7 builtin/fsck: add `git-refs verify` child processshejialuo, Jun 18, 2024
  46. 5/7 files-backend: add unified interface for refs scanningshejialuo, Jun 18, 2024
  47. 6/7 fsck: add ref name check for files backendshejialuo, Jun 18, 2024
  48. 7/7 fsck: add ref content check for files backendshejialuo, Jun 18, 2024
  49. [GSoC][PATCH v4 0/7] ref consistency check infra setupshejialuo, Jun 19, 2024
  50. [GSoC][PATCH v4 1/7] fsck: add refs check interfaces to interact with fsck error levelsshejialuo, Jun 19, 2024
  51. Junio C HamanoJun 20, 2024
  52. shejialuoJun 21, 2024
  53. [GSoC][PATCH v4 2/7] refs: set up ref consistency check infrastructureshejialuo, Jun 19, 2024
  54. [GSoC][PATCH v4 3/7] builtin/refs: add verify subcommandshejialuo, Jun 19, 2024
  55. [GSoC][PATCH v4 4/7] builtin/fsck: add `git-refs verify` child processshejialuo, Jun 19, 2024
  56. [GSoC][PATCH v4 5/7] files-backend: add unified interface for refs scanningshejialuo, Jun 19, 2024
  57. [GSoC][PATCH v4 6/7] fsck: add ref name check for files backendshejialuo, Jun 19, 2024
  58. [GSoC][PATCH v4 7/7] fsck: add ref content check for files backendshejialuo, Jun 19, 2024
  59. [GSoC][PATCH v5 00/12] ref consistency check infra setupshejialuo, Jun 27, 2024
  60. [GSoC][PATCH v5 01/12] fsck: rename "fsck_options" to "fsck_objects_options"shejialuo, Jun 27, 2024
  61. Junio C HamanoJun 27, 2024
  62. shejialuoJun 28, 2024
  63. [GSoC][PATCH v5 02/12] fsck: use "fsck_configs" to set up configsshejialuo, Jun 27, 2024
  64. Junio C HamanoJun 27, 2024
  65. shejialuoJun 28, 2024
  66. [GSoC][PATCH v5 03/12] fsck: abstract common options for reusingshejialuo, Jun 27, 2024
  67. [GSoC][PATCH v5 04/12] fsck: add "fsck_refs_options" structshejialuo, Jun 27, 2024
  68. [GSoC][PATCH v5 05/12] fsck: add a unified interface for reporting fsck messagesshejialuo, Jun 27, 2024
  69. [GSoC][PATCH v5 06/12] fsck: add "fsck_refs_options" initialization macrosshejialuo, Jun 27, 2024
  70. [GSoC][PATCH v5 07/12] refs: set up ref consistency check infrastructureshejialuo, Jun 27, 2024
  71. [GSoC][PATCH v5 08/12] builtin/refs: add verify subcommandshejialuo, Jun 27, 2024
  72. [GSoC][PATCH v5 09/12] builtin/fsck: add `git-refs verify` child processshejialuo, Jun 27, 2024
  73. [GSoC][PATCH v5 10/12] files-backend: add unified interface for refs scanningshejialuo, Jun 27, 2024
  74. [GSoC][PATCH v5 11/12] fsck: add ref name check for files backendshejialuo, Jun 27, 2024
  75. [GSoC][PATCH v5 12/12] fsck: add ref content check for files backendshejialuo, Jun 27, 2024
  76. [GSoC][PATCH v6 00/11] ref consistency check infra setupshejialuo, Jul 1, 2024
  77. 01/11 fsck: add "fsck_objects_options" to hold objects-related optionsshejialuo, Jul 1, 2024
  78. [GSoC][PATCH v6 02/11] fsck: rename "skiplist" to "oid_skiplist"shejialuo, Jul 1, 2024
  79. [GSoC][PATCH v6 03/11] fsck: add "fsck_refs_options" into "fsck_options"shejialuo, Jul 1, 2024
  80. [GSoC][PATCH v6 04/11] fsck: add a unified interface for reporting fsck messagesshejialuo, Jul 1, 2024
  81. [GSoC][PATCH v6 05/11] fsck: add "fsck_refs_options" initialization macrosshejialuo, Jul 1, 2024
  82. [GSoC][PATCH v6 06/11] refs: set up ref consistency check infrastructureshejialuo, Jul 1, 2024
  83. [GSoC][PATCH v6 07/11] builtin/refs: add verify subcommandshejialuo, Jul 1, 2024
  84. [GSoC][PATCH v6 08/11] builtin/fsck: add `git-refs verify` child processshejialuo, Jul 1, 2024
  85. [GSoC][PATCH v6 09/11] files-backend: add unified interface for refs scanningshejialuo, Jul 1, 2024
  86. [GSoC][PATCH v6 10/11] fsck: add ref name check for files backendshejialuo, Jul 1, 2024
  87. [GSoC][PATCH v6 11/11] fsck: add ref content check for files backendshejialuo, Jul 1, 2024
  88. Karthik NayakJul 2, 2024
  89. shejialuoJul 2, 2024
  90. Junio C HamanoJul 2, 2024
  91. [GSoC][PATCH v7 0/9] ref consistency check infra setupshejialuo, Jul 3, 2024
  92. [GSoC][PATCH v7 1/9] fsck: rename "skiplist" to "oid_skiplist"shejialuo, Jul 3, 2024
  93. Justin ToblerJul 5, 2024
  94. shejialuoJul 8, 2024
  95. [GSoC][PATCH v7 2/9] fsck: add a unified interface for reporting fsck messagesshejialuo, Jul 3, 2024
  96. Justin ToblerJul 5, 2024
  97. shejialuoJul 8, 2024
  98. [GSoC][PATCH v7 3/9] fsck: add refs-related options and error report functionshejialuo, Jul 3, 2024
  99. [GSoC][PATCH v7 4/9] refs: set up ref consistency check infrastructureshejialuo, Jul 3, 2024
  100. [GSoC][PATCH v7 5/9] builtin/refs: add verify subcommandshejialuo, Jul 3, 2024
  101. [GSoC][PATCH v7 6/9] builtin/fsck: add `git-refs verify` child processshejialuo, Jul 3, 2024
  102. [GSoC][PATCH v7 7/9] files-backend: add unified interface for refs scanningshejialuo, Jul 3, 2024
  103. [GSoC][PATCH v7 8/9] fsck: add ref name check for files backendshejialuo, Jul 3, 2024
  104. [GSoC][PATCH v7 9/9] fsck: add ref content check for files backendshejialuo, Jul 3, 2024
  105. [GSoC][PATCH v8 0/9] ref consistency check infra setupshejialuo, Jul 8, 2024
  106. [GSoC][PATCH v8 1/9] fsck: rename "skiplist" to "oid_skiplist"shejialuo, Jul 8, 2024
  107. [GSoC][PATCH v8 2/9] fsck: add a unified interface for reporting fsck messagesshejialuo, Jul 8, 2024
  108. Karthik NayakJul 8, 2024
  109. shejialuoJul 8, 2024
  110. Karthik NayakJul 8, 2024
  111. [GSoC][PATCH v8 3/9] fsck: add refs-related options and error report functionshejialuo, Jul 8, 2024
  112. Karthik NayakJul 8, 2024
  113. shejialuoJul 8, 2024
  114. [GSoC][PATCH v8 4/9] refs: set up ref consistency check infrastructureshejialuo, Jul 8, 2024
  115. [GSoC][PATCH v8 5/9] builtin/refs: add verify subcommandshejialuo, Jul 8, 2024
  116. [GSoC][PATCH v8 6/9] builtin/fsck: add `git-refs verify` child processshejialuo, Jul 8, 2024
  117. [GSoC][PATCH v8 7/9] files-backend: add unified interface for refs scanningshejialuo, Jul 8, 2024
  118. [GSoC][PATCH v8 8/9] fsck: add ref name check for files backendshejialuo, Jul 8, 2024
  119. [GSoC][PATCH v8 9/9] fsck: add ref content check for files backendshejialuo, Jul 8, 2024
  120. [GSoC][PATCH v9 0/9] ref consistency check infra setupshejialuo, Jul 9, 2024
  121. [GSoC][PATCH v9 1/9] fsck: rename "skiplist" to "skip_oids"shejialuo, Jul 9, 2024
  122. [GSoC][PATCH v9 2/9] fsck: add a unified interface for reporting fsck messagesshejialuo, Jul 9, 2024
  123. Justin ToblerJul 9, 2024
  124. shejialuoJul 10, 2024
  125. [GSoC][PATCH v9 3/9] fsck: add refs-related options and error report functionshejialuo, Jul 9, 2024
  126. Justin ToblerJul 9, 2024
  127. Eric SunshineJul 9, 2024
  128. shejialuoJul 10, 2024
  129. shejialuoJul 10, 2024
  130. [GSoC][PATCH v9 4/9] refs: set up ref consistency check infrastructureshejialuo, Jul 9, 2024
  131. Justin ToblerJul 9, 2024
  132. shejialuoJul 10, 2024
  133. [GSoC][PATCH v9 5/9] builtin/refs: add verify subcommandshejialuo, Jul 9, 2024
  134. Justin ToblerJul 9, 2024
  135. shejialuoJul 10, 2024
  136. [GSoC][PATCH v9 6/9] builtin/fsck: add `git-refs verify` child processshejialuo, Jul 9, 2024
  137. [GSoC][PATCH v9 7/9] files-backend: add unified interface for refs scanningshejialuo, Jul 9, 2024
  138. [GSoC][PATCH v9 8/9] fsck: add ref name check for files backendshejialuo, Jul 9, 2024
  139. [GSoC][PATCH v9 9/9] fsck: add ref content check for files backendshejialuo, Jul 9, 2024
  140. [GSoC][PATCH v10 00/10] ref consistency check infra setupshejialuo, Jul 10, 2024
  141. [GSoC][PATCH v10 01/10] fsck: rename "skiplist" to "skip_oids"shejialuo, Jul 10, 2024
  142. [GSoC][PATCH v10 02/10] fsck: rename objects-related fsck error functionsshejialuo, Jul 10, 2024
  143. [GSoC][PATCH v10 03/10] fsck: add a unified interface for reporting fsck messagesshejialuo, Jul 10, 2024
  144. Junio C HamanoJul 10, 2024
  145. shejialuoJul 11, 2024
  146. [GSoC][PATCH v10 04/10] fsck: add refs-related error report functionshejialuo, Jul 10, 2024
  147. [GSoC][PATCH v10 05/10] refs: set up ref consistency check infrastructureshejialuo, Jul 10, 2024
  148. [GSoC][PATCH v10 06/10] builtin/refs: add verify subcommand and verbose_refs for "fsck_options"shejialuo, Jul 10, 2024
  149. Junio C HamanoJul 10, 2024
  150. shejialuoJul 11, 2024
  151. [GSoC][PATCH v10 07/10] builtin/fsck: add `git-refs verify` child processshejialuo, Jul 10, 2024
  152. [GSoC][PATCH v10 08/10] files-backend: add unified interface for refs scanningshejialuo, Jul 10, 2024
  153. [GSoC][PATCH v10 09/10] fsck: add ref name check for files backendshejialuo, Jul 10, 2024
  154. [GSoC][PATCH v10 10/10] fsck: add ref content check for files backendshejialuo, Jul 10, 2024
  155. [GSoC][PATCH v11 00/10] ref consistency check infra setupshejialuo, Jul 14, 2024
  156. [GSoC][PATCH v11 01/10] fsck: rename "skiplist" to "skip_oids"shejialuo, Jul 14, 2024
  157. [GSoC][PATCH v11 02/10] fsck: add a unified interface for reporting fsck messagesshejialuo, Jul 14, 2024
  158. Karthik NayakJul 18, 2024
  159. shejialuoJul 20, 2024
  160. [GSoC][PATCH v11 03/10] fsck: rename objects-related fsck error functionsshejialuo, Jul 14, 2024
  161. [GSoC][PATCH v11 04/10] fsck: add refs-related error report functionshejialuo, Jul 14, 2024
  162. [GSoC][PATCH v11 05/10] refs: set up ref consistency check infrastructureshejialuo, Jul 14, 2024
  163. [GSoC][PATCH v11 06/10] git refs: add verify subcommandshejialuo, Jul 14, 2024
  164. [GSoC][PATCH v11 07/10] builtin/fsck: add `git-refs verify` child processshejialuo, Jul 14, 2024
  165. [GSoC][PATCH v11 08/10] files-backend: add unified interface for refs scanningshejialuo, Jul 14, 2024
  166. [GSoC][PATCH v11 09/10] fsck: add ref name check for files backendshejialuo, Jul 14, 2024
  167. [GSoC][PATCH v11 10/10] fsck: add ref content check for files backendshejialuo, Jul 14, 2024
  168. Karthik NayakJul 18, 2024
  169. Junio C HamanoJul 18, 2024
  170. Karthik NayakJul 19, 2024
  171. shejialuoJul 20, 2024
  172. shejialuoJul 20, 2024
  173. [GSoC][PATCH v12 00/10] ref consistency check infra setupshejialuo, Jul 20, 2024
  174. [GSoC][PATCH v12 01/10] fsck: rename "skiplist" to "skip_oids"shejialuo, Jul 20, 2024
  175. [GSoC][PATCH v12 02/10] fsck: add a unified interface for reporting fsck messagesshejialuo, Jul 20, 2024
  176. Karthik NayakJul 23, 2024
  177. [GSoC][PATCH v12 03/10] fsck: rename objects-related fsck error functionsshejialuo, Jul 20, 2024
  178. [GSoC][PATCH v12 04/10] fsck: add refs-related error report functionshejialuo, Jul 20, 2024
  179. [GSoC][PATCH v12 05/10] refs: set up ref consistency check infrastructureshejialuo, Jul 20, 2024
  180. [GSoC][PATCH v12 06/10] git refs: add verify subcommandshejialuo, Jul 20, 2024
  181. [GSoC][PATCH v12 07/10] builtin/fsck: add `git-refs verify` child processshejialuo, Jul 20, 2024
  182. [GSoC][PATCH v12 08/10] files-backend: add unified interface for refs scanningshejialuo, Jul 20, 2024
  183. [GSoC][PATCH v12 09/10] fsck: add ref name check for files backendshejialuo, Jul 20, 2024
  184. [GSoC][PATCH v12 10/10] fsck: add ref content check for files backendshejialuo, Jul 20, 2024
  185. [GSoC][PATCH v13 00/10] ref consistency check infra setupshejialuo, Jul 29, 2024
  186. [GSoC][PATCH v13 01/10] fsck: rename "skiplist" to "skip_oids"shejialuo, Jul 29, 2024
  187. [GSoC][PATCH v13 02/10] fsck: add a unified interface for reporting fsck messagesshejialuo, Jul 29, 2024
  188. Patrick SteinhardtJul 30, 2024
  189. shejialuoJul 30, 2024
  190. [GSoC][PATCH v13 03/10] fsck: rename objects-related fsck error functionsshejialuo, Jul 29, 2024
  191. Patrick SteinhardtJul 30, 2024
  192. shejialuoJul 30, 2024
  193. [GSoC][PATCH v13 04/10] fsck: add refs-related error report functionshejialuo, Jul 29, 2024
  194. Patrick SteinhardtJul 30, 2024
  195. shejialuoJul 30, 2024
  196. [GSoC][PATCH v13 05/10] refs: set up ref consistency check infrastructureshejialuo, Jul 29, 2024
  197. Patrick SteinhardtJul 30, 2024
  198. shejialuoJul 30, 2024
  199. [GSoC][PATCH v13 06/10] git refs: add verify subcommandshejialuo, Jul 29, 2024
  200. Patrick SteinhardtJul 30, 2024
  201. shejialuoJul 30, 2024
  202. Eric SunshineJul 30, 2024
  203. [GSoC][PATCH v13 07/10] builtin/fsck: add `git-refs verify` child processshejialuo, Jul 29, 2024
  204. [GSoC][PATCH v13 08/10] files-backend: add unified interface for refs scanningshejialuo, Jul 29, 2024
  205. Patrick SteinhardtJul 30, 2024
  206. shejialuoJul 30, 2024
  207. [GSoC][PATCH v13 09/10] fsck: add ref name check for files backendshejialuo, Jul 29, 2024
  208. Patrick SteinhardtJul 30, 2024
  209. shejialuoJul 30, 2024
  210. [GSoC][PATCH v13 10/10] fsck: add ref content check for files backendshejialuo, Jul 29, 2024
  211. Patrick SteinhardtJul 30, 2024
  212. shejialuoJul 30, 2024
  213. Junio C HamanoJul 30, 2024
  214. shejialuoJul 31, 2024
  215. Patrick SteinhardtJul 30, 2024
  216. shejialuoJul 30, 2024
  217. [GSoC][PATCH v14 00/11] ref consistency check infra setupshejialuo, Aug 1, 2024
  218. [GSoC][PATCH v14 01/11] fsck: rename "skiplist" to "skip_oids"shejialuo, Aug 1, 2024
  219. [GSoC][PATCH v14 02/11] fsck: make "fsck_error" callback genericshejialuo, Aug 1, 2024
  220. [GSoC][PATCH v14 03/11] fsck: add a unified interface for reporting fsck messagesshejialuo, Aug 1, 2024
  221. Patrick SteinhardtAug 5, 2024
  222. shejialuoAug 5, 2024
  223. [GSoC][PATCH v14 04/11] fsck: add refs report functionshejialuo, Aug 1, 2024
  224. Patrick SteinhardtAug 5, 2024
  225. [GSoC][PATCH v14 05/11] fsck: add refs-related error callbackshejialuo, Aug 1, 2024
  226. Patrick SteinhardtAug 5, 2024
  227. [GSoC][PATCH v14 06/11] fsck: rename objects-related fsck error functionsshejialuo, Aug 1, 2024
  228. Patrick SteinhardtAug 5, 2024
  229. [GSoC][PATCH v14 07/11] refs: set up ref consistency check infrastructureshejialuo, Aug 1, 2024
  230. [GSoC][PATCH v14 08/11] builtin/refs: add verify subcommandshejialuo, Aug 1, 2024
  231. [GSoC][PATCH v14 09/11] builtin/fsck: add `git-refs verify` child processshejialuo, Aug 1, 2024
  232. Patrick SteinhardtAug 5, 2024
  233. shejialuoAug 5, 2024
  234. Junio C HamanoAug 5, 2024
  235. shejialuoAug 5, 2024
  236. Junio C HamanoAug 5, 2024
  237. shejialuoAug 6, 2024
  238. Patrick SteinhardtAug 6, 2024
  239. Junio C HamanoAug 6, 2024
  240. Patrick SteinhardtAug 7, 2024
  241. Patrick SteinhardtAug 6, 2024
  242. [GSoC][PATCH v14 10/11] files-backend: add unified interface for refs scanningshejialuo, Aug 1, 2024
  243. Patrick SteinhardtAug 5, 2024
  244. [GSoC][PATCH v14 11/11] fsck: add ref name check for files backendshejialuo, Aug 1, 2024
  245. Patrick SteinhardtAug 5, 2024
  246. Patrick SteinhardtAug 5, 2024
  247. [GSoC][PATCH v15 0/9] ref consistency check infra setupshejialuo, Aug 5, 2024
  248. [GSoC][PATCH v15 1/9] fsck: rename "skiplist" to "skip_oids"shejialuo, Aug 5, 2024
  249. [GSoC][PATCH v15 2/9] fsck: rename objects-related fsck error functionsshejialuo, Aug 5, 2024
  250. [GSoC][PATCH v15 3/9] fsck: make "fsck_error" callback genericshejialuo, Aug 5, 2024
  251. Karthik NayakAug 7, 2024
  252. [GSoC][PATCH v15 4/9] fsck: add a unified interface for reporting fsck messagesshejialuo, Aug 5, 2024
  253. Karthik NayakAug 7, 2024
  254. [GSoC][PATCH v15 5/9] fsck: add refs report functionshejialuo, Aug 5, 2024
  255. Patrick SteinhardtAug 6, 2024
  256. [GSoC][PATCH v15 6/9] refs: set up ref consistency check infrastructureshejialuo, Aug 5, 2024
  257. [GSoC][PATCH v15 7/9] builtin/refs: add verify subcommandshejialuo, Aug 5, 2024
  258. Patrick SteinhardtAug 6, 2024
  259. Junio C HamanoAug 6, 2024
  260. Patrick SteinhardtAug 7, 2024
  261. shejialuoAug 7, 2024
  262. Karthik NayakAug 8, 2024
  263. Junio C HamanoAug 7, 2024
  264. [GSoC][PATCH v15 8/9] files-backend: add unified interface for refs scanningshejialuo, Aug 5, 2024
  265. Patrick SteinhardtAug 6, 2024
  266. [GSoC][PATCH v15 9/9] fsck: add ref name check for files backendshejialuo, Aug 5, 2024
  267. Patrick SteinhardtAug 6, 2024
  268. Karthik NayakAug 7, 2024
  269. [GSoC][PATCH v16 0/9] ref consistency check infra setupshejialuo, Aug 8, 2024
  270. [GSoC][PATCH v16 1/9] fsck: rename "skiplist" to "skip_oids"shejialuo, Aug 8, 2024
  271. [GSoC][PATCH v16 2/9] fsck: rename objects-related fsck error functionsshejialuo, Aug 8, 2024
  272. [GSoC][PATCH v16 3/9] fsck: make "fsck_error" callback genericshejialuo, Aug 8, 2024
  273. [GSoC][PATCH v16 4/9] fsck: add a unified interface for reporting fsck messagesshejialuo, Aug 8, 2024
  274. [GSoC][PATCH v16 5/9] fsck: add refs report functionshejialuo, Aug 8, 2024
  275. [GSoC][PATCH v16 6/9] refs: set up ref consistency check infrastructureshejialuo, Aug 8, 2024
  276. [GSoC][PATCH v16 7/9] builtin/refs: add verify subcommandshejialuo, Aug 8, 2024
  277. 1/2 refs.c: remove redundant translation markersTeng Long, Oct 4, 2024
  278. shejialuoOct 6, 2024
  279. [GSoC][PATCH v16 8/9] files-backend: add unified interface for refs scanningshejialuo, Aug 8, 2024
  280. [GSoC][PATCH v16 9/9] fsck: add ref name check for files backendshejialuo, Aug 8, 2024
  281. Patrick SteinhardtAug 8, 2024
  282. Junio C HamanoAug 8, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.