git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
72576235833397455659af483654ad863286d31b blob 4553 bytes (raw)

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
 
== Git Repository Format Versions

Every git repository is marked with a numeric version in the
`core.repositoryformatversion` key of its `config` file. This version
specifies the rules for operating on the on-disk repository data. An
implementation of git which does not understand a particular version
advertised by an on-disk repository MUST NOT operate on that repository;
doing so risks not only producing wrong results, but actually losing
data.

Because of this rule, version bumps should be kept to an absolute
minimum. Instead, we generally prefer these strategies:

  - bumping format version numbers of individual data files (e.g.,
    index, packfiles, etc). This restricts the incompatibilities only to
    those files.

  - introducing new data that gracefully degrades when used by older
    clients (e.g., pack bitmap files are ignored by older clients, which
    simply do not take advantage of the optimization they provide).

A whole-repository format version bump should only be part of a change
that cannot be independently versioned. For instance, if one were to
change the reachability rules for objects, or the rules for locking
refs, that would require a bump of the repository format version.

Note that this applies only to accessing the repository's disk contents
directly. An older client which understands only format `0` may still
connect via `git://` to a repository using format `1`, as long as the
server process understands format `1`.

The preferred strategy for rolling out a version bump (whether whole
repository or for a single file) is to teach git to read the new format,
and allow writing the new format with a config switch or command line
option (for experimentation or for those who do not care about backwards
compatibility with older gits). Then after a long period to allow the
reading capability to become common, we may switch to writing the new
format by default.

The currently defined format versions are:

=== Version `0`

This is the format defined by the initial version of git, including but
not limited to the format of the repository directory, the repository
configuration file, and the object and ref storage. Specifying the
complete behavior of git is beyond the scope of this document.

=== Version `1`

This format is identical to version `0`, with the following exceptions:

  1. When reading the `core.repositoryformatversion` variable, a git
     implementation which supports version 1 MUST also read any
     configuration keys found in the `extensions` section of the
     configuration file.

  2. If a version-1 repository specifies any `extensions.*` keys that
     the running git has not implemented, the operation MUST NOT
     proceed. Similarly, if the value of any known key is not understood
     by the implementation, the operation MUST NOT proceed.

Note that if no extensions are specified in the config file, then
`core.repositoryformatversion` SHOULD be set to `0` (setting it to `1`
provides no benefit, and makes the repository incompatible with older
implementations of git).

This document will serve as the master list for extensions. Any
implementation wishing to define a new extension should make a note of
it here, in order to claim the name.

The defined extensions are:

==== `noop`

This extension does not change git's behavior at all. It is useful only
for testing format-1 compatibility.

==== `preciousObjects`

When the config key `extensions.preciousObjects` is set to `true`,
objects in the repository MUST NOT be deleted (e.g., by `git-prune` or
`git repack -d`).

==== `partialclone`

When the config key `extensions.partialclone` is set, it indicates
that the repo was created with a partial clone (or later performed
a partial fetch) and that the remote may have omitted sending
certain unwanted objects.  Such a remote is called a "promisor remote"
and it promises that all such omitted objects can be fetched from it
in the future.

The value of this key is the name of the promisor remote.

==== `worktreeConfig`

If set, by default "git config" reads from both "config" and
"config.worktree" file from GIT_DIR in that order. In
multiple working directory mode, "config" file is shared while
"config.worktree" is per-working directory (i.e., it's in
GIT_COMMON_DIR/worktrees/<id>/config.worktree)

==== `refStorage`

Specifies the file format for the ref database. Values are `files`
(for the traditional packed + loose ref format) and `reftable` for the
binary reftable format. See https://github.com/google/reftable for
more information.
debug log:

solving 725762358333 ...
found 725762358333 in https://public-inbox.org/git/2dc73bf2ec96acae12a17c719083d11401775bc3.1618255553.git.gitgitgadget@gmail.com/ ||
	https://public-inbox.org/git/bdb19af22cc7c4f3383f03f42cb4906c3ec5c5f3.1615580397.git.gitgitgadget@gmail.com/ ||
	https://public-inbox.org/git/2fd7cb8c0983501e2af2f195aec81d7c17fb80e1.1618832277.git.gitgitgadget@gmail.com/
found 7844ef30ffde in https://80x24.org/mirrors/git.git
preparing index
index prepared:
100644 7844ef30ffdefd9158ae49ddd5d03d6a5c4edd4c	Documentation/technical/repository-version.txt

applying [1/3] https://public-inbox.org/git/2dc73bf2ec96acae12a17c719083d11401775bc3.1618255553.git.gitgitgadget@gmail.com/
diff --git a/Documentation/technical/repository-version.txt b/Documentation/technical/repository-version.txt
index 7844ef30ffde..725762358333 100644

Checking patch Documentation/technical/repository-version.txt...
Applied patch Documentation/technical/repository-version.txt cleanly.

skipping https://public-inbox.org/git/bdb19af22cc7c4f3383f03f42cb4906c3ec5c5f3.1615580397.git.gitgitgadget@gmail.com/ for 725762358333
skipping https://public-inbox.org/git/2fd7cb8c0983501e2af2f195aec81d7c17fb80e1.1618832277.git.gitgitgadget@gmail.com/ for 725762358333
index at:
100644 72576235833397455659af483654ad863286d31b	Documentation/technical/repository-version.txt

Code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).