]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'ch/refs-without-the-repository-fix'
authorJunio C Hamano <gitster@pobox.com>
Thu, 18 Jul 2024 15:30:25 +0000 (08:30 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 18 Jul 2024 15:30:25 +0000 (08:30 -0700)
Comment fix.

* ch/refs-without-the-repository-fix:
  refs: correct the version numbers in a comment

1  2 
refs.h

diff --cc refs.h
index 0ecba21b4a77a811e0dfcc7b0c9a327c42206333,e79b7c0ef5674820d9ebdb3a3b153aec7d4f9b4a..b3e39bc257046d9672d2fdafb50e2e05c76f4bee
--- 1/refs.h
--- 2/refs.h
+++ b/refs.h
@@@ -1021,76 -997,14 +1021,76 @@@ extern struct ref_namespace_info ref_na
   */
  void update_ref_namespace(enum ref_namespace namespace, char *ref);
  
 -int is_pseudoref(struct ref_store *refs, const char *refname);
 -int is_headref(struct ref_store *refs, const char *refname);
 +/*
 + * Check whether the provided name names a root reference. This function only
 + * performs a syntactic check.
 + *
 + * A root ref is a reference that lives in the root of the reference hierarchy.
 + * These references must conform to special syntax:
 + *
 + *   - Their name must be all-uppercase or underscores ("_").
 + *
 + *   - Their name must end with "_HEAD". As a special rule, "HEAD" is a root
 + *     ref, as well.
 + *
 + *   - Their name may not contain a slash.
 + *
 + * There is a special set of irregular root refs that exist due to historic
 + * reasons, only. This list shall not be expanded in the future:
 + *
 + *   - AUTO_MERGE
 + *
 + *   - BISECT_EXPECTED_REV
 + *
 + *   - NOTES_MERGE_PARTIAL
 + *
 + *   - NOTES_MERGE_REF
 + *
 + *   - MERGE_AUTOSTASH
 + */
 +int is_root_ref(const char *refname);
 +
 +/*
 + * Pseudorefs are refs that have different semantics compared to
 + * "normal" refs. These refs can thus not be stored in the ref backend,
 + * but must always be accessed via the filesystem. The following refs
 + * are pseudorefs:
 + *
 + * - FETCH_HEAD may contain multiple object IDs, and each one of them
 + *   carries additional metadata like where it came from.
 + *
 + * - MERGE_HEAD may contain multiple object IDs when merging multiple
 + *   heads.
 + *
 + * Reading, writing or deleting references must consistently go either
 + * through the filesystem (pseudorefs) or through the reference
 + * backend (normal ones).
 + */
 +int is_pseudo_ref(const char *refname);
 +
 +/*
 + * The following flags can be passed to `repo_migrate_ref_storage_format()`:
 + *
 + *   - REPO_MIGRATE_REF_STORAGE_FORMAT_DRYRUN: perform a dry-run migration
 + *     without touching the main repository. The result will be written into a
 + *     temporary ref storage directory.
 + */
 +#define REPO_MIGRATE_REF_STORAGE_FORMAT_DRYRUN (1 << 0)
 +
 +/*
 + * Migrate the ref storage format used by the repository to the
 + * specified one.
 + */
 +int repo_migrate_ref_storage_format(struct repository *repo,
 +                                  enum ref_storage_format format,
 +                                  unsigned int flags,
 +                                  struct strbuf *err);
  
  /*
-  * The following functions have been removed in Git v2.45 in favor of functions
+  * The following functions have been removed in Git v2.46 in favor of functions
   * that receive a `ref_store` as parameter. The intent of this section is
   * merely to help patch authors of in-flight series to have a reference what
-  * they should be migrating to. The section will be removed in Git v2.46.
+  * they should be migrating to. The section will be removed in Git v2.47.
   */
  #if 0
  static char *resolve_refdup(const char *refname, int resolve_flags,