118
<20170223155046.e7nxivfwqqoprsqj@LykOS.localdomain>,
119
<CA+EOSBncr=4a4d8n9xS4FNehyebpmX8JiUwCsXD47EQDE+DiUQ@mail.gmail.com>.
120
121
+* The default storage format for references in newly created repositories will
122
+ be changed from "files" to "reftable". The "reftable" format provides
123
+ multiple advantages over the "files" format:
124
++
125
+ ** It is impossible to store two references that only differ in casing on
126
+ case-insensitive filesystems with the "files" format. This issue is common
127
+ on Windows and macOS platforms. As the "reftable" backend does not use
128
+ filesystem paths to encode reference names this problem goes away.
129
+ ** Similarly, macOS normalizes path names that contain unicode characters,
130
+ which has the consequence that you cannot store two names with unicode
131
+ characters that are encoded differently with the "files" backend. Again,
132
+ this is not an issue with the "reftable" backend.
133
+ ** Deleting references with the "files" backend requires Git to rewrite the
134
+ complete "packed-refs" file. In large repositories with many references
135
+ this file can easily be dozens of megabytes in size, in extreme cases it
136
+ may be gigabytes. The "reftable" backend uses tombstone markers for
137
+ deleted references and thus does not have to rewrite all of its data.
138
+ ** Repository housekeeping with the "files" backend typically performs
139
+ all-into-one repacks of references. This can be quite expensive, and
140
+ consequently housekeeping is a tradeoff between the number of loose
141
+ references that accumulate and slow down operations that read references,
142
+ and compressing those loose references into the "packed-refs" file. The
143
+ "reftable" backend uses geometric compaction after every write, which
144
+ amortizes costs and ensures that the backend is always in a
145
+ well-maintained state.
146
+ ** Operations that write multiple references at once are not atomic with the
147
+ "files" backend. Consequently, Git may see in-between states when it reads
148
+ references while a reference transaction is in the process of being
149
+ committed to disk.
150
+ ** Writing many references at once is slow with the "files" backend because
151
+ every reference is created as a separate file. The "reftable" backend
152
+ significantly outperforms the "files" backend by multiple orders of
153
+ magnitude.
154
+ ** The reftable backend uses a binary format with prefix compression for
155
+ reference names. As a result, the format uses less space compared to the
156
+ "packed-refs" file.
157
++
158
+Users that get immediate benefit from the "reftable" backend could continue to
159
+opt-in to the "reftable" format manually by setting the "init.defaultRefFormat"
160
+config. But defaults matter, and we think that overall users will have a better
161
+experience with less platform-specific quirks when they use the new backend by
162
+default.
163
++
164
+A prerequisite for this change is that the ecosystem is ready to support the
165
+"reftable" format. Most importantly, alternative implementations of Git like
166
+JGit, libgit2 and Gitoxide need to support it.
167
+
168
=== Removals
169
170
* Support for grafting commits has long been superseded by git-replace(1).