3 #include "refs-internal.h"
5 #include "packed-backend.h"
6 #include "../iterator.h"
7 #include "../lockfile.h"
9 struct packed_ref_cache
{
10 struct ref_cache
*cache
;
13 * Count of references to the data structure in this instance,
14 * including the pointer from files_ref_store::packed if any.
15 * The data will not be freed as long as the reference count
18 unsigned int referrers
;
20 /* The metadata from when this packed-refs cache was read */
21 struct stat_validity validity
;
25 * Increment the reference count of *packed_refs.
27 static void acquire_packed_ref_cache(struct packed_ref_cache
*packed_refs
)
29 packed_refs
->referrers
++;
33 * Decrease the reference count of *packed_refs. If it goes to zero,
34 * free *packed_refs and return true; otherwise return false.
36 static int release_packed_ref_cache(struct packed_ref_cache
*packed_refs
)
38 if (!--packed_refs
->referrers
) {
39 free_ref_cache(packed_refs
->cache
);
40 stat_validity_clear(&packed_refs
->validity
);
49 * A container for `packed-refs`-related data. It is not (yet) a
52 struct packed_ref_store
{
53 struct ref_store base
;
55 unsigned int store_flags
;
57 /* The path of the "packed-refs" file: */
61 * A cache of the values read from the `packed-refs` file, if
62 * it might still be current; otherwise, NULL.
64 struct packed_ref_cache
*cache
;
67 * Lock used for the "packed-refs" file. Note that this (and
68 * thus the enclosing `packed_ref_store`) must not be freed.
70 struct lock_file lock
;
73 * Temporary file used when rewriting new contents to the
74 * "packed-refs" file. Note that this (and thus the enclosing
75 * `packed_ref_store`) must not be freed.
77 struct tempfile tempfile
;
80 struct ref_store
*packed_ref_store_create(const char *path
,
81 unsigned int store_flags
)
83 struct packed_ref_store
*refs
= xcalloc(1, sizeof(*refs
));
84 struct ref_store
*ref_store
= (struct ref_store
*)refs
;
86 base_ref_store_init(ref_store
, &refs_be_packed
);
87 refs
->store_flags
= store_flags
;
89 refs
->path
= xstrdup(path
);
94 * Die if refs is not the main ref store. caller is used in any
95 * necessary error messages.
97 static void packed_assert_main_repository(struct packed_ref_store
*refs
,
100 if (refs
->store_flags
& REF_STORE_MAIN
)
103 die("BUG: operation %s only allowed for main ref store", caller
);
107 * Downcast `ref_store` to `packed_ref_store`. Die if `ref_store` is
108 * not a `packed_ref_store`. Also die if `packed_ref_store` doesn't
109 * support at least the flags specified in `required_flags`. `caller`
110 * is used in any necessary error messages.
112 static struct packed_ref_store
*packed_downcast(struct ref_store
*ref_store
,
113 unsigned int required_flags
,
116 struct packed_ref_store
*refs
;
118 if (ref_store
->be
!= &refs_be_packed
)
119 die("BUG: ref_store is type \"%s\" not \"packed\" in %s",
120 ref_store
->be
->name
, caller
);
122 refs
= (struct packed_ref_store
*)ref_store
;
124 if ((refs
->store_flags
& required_flags
) != required_flags
)
125 die("BUG: unallowed operation (%s), requires %x, has %x\n",
126 caller
, required_flags
, refs
->store_flags
);
131 static void clear_packed_ref_cache(struct packed_ref_store
*refs
)
134 struct packed_ref_cache
*cache
= refs
->cache
;
137 release_packed_ref_cache(cache
);
141 /* The length of a peeled reference line in packed-refs, including EOL: */
142 #define PEELED_LINE_LENGTH 42
145 * Parse one line from a packed-refs file. Write the SHA1 to sha1.
146 * Return a pointer to the refname within the line (null-terminated),
147 * or NULL if there was a problem.
149 static const char *parse_ref_line(struct strbuf
*line
, struct object_id
*oid
)
153 if (parse_oid_hex(line
->buf
, oid
, &ref
) < 0)
155 if (!isspace(*ref
++))
161 if (line
->buf
[line
->len
- 1] != '\n')
163 line
->buf
[--line
->len
] = 0;
169 * Read from `packed_refs_file` into a newly-allocated
170 * `packed_ref_cache` and return it. The return value will already
171 * have its reference count incremented.
173 * A comment line of the form "# pack-refs with: " may contain zero or
174 * more traits. We interpret the traits as follows:
178 * Probably no references are peeled. But if the file contains a
179 * peeled value for a reference, we will use it.
183 * References under "refs/tags/", if they *can* be peeled, *are*
184 * peeled in this file. References outside of "refs/tags/" are
185 * probably not peeled even if they could have been, but if we find
186 * a peeled value for such a reference we will use it.
190 * All references in the file that can be peeled are peeled.
191 * Inversely (and this is more important), any references in the
192 * file for which no peeled value is recorded is not peelable. This
193 * trait should typically be written alongside "peeled" for
194 * compatibility with older clients, but we do not require it
195 * (i.e., "peeled" is a no-op if "fully-peeled" is set).
197 static struct packed_ref_cache
*read_packed_refs(const char *packed_refs_file
)
200 struct packed_ref_cache
*packed_refs
= xcalloc(1, sizeof(*packed_refs
));
201 struct ref_entry
*last
= NULL
;
202 struct strbuf line
= STRBUF_INIT
;
203 enum { PEELED_NONE
, PEELED_TAGS
, PEELED_FULLY
} peeled
= PEELED_NONE
;
206 acquire_packed_ref_cache(packed_refs
);
207 packed_refs
->cache
= create_ref_cache(NULL
, NULL
);
208 packed_refs
->cache
->root
->flag
&= ~REF_INCOMPLETE
;
210 f
= fopen(packed_refs_file
, "r");
212 if (errno
== ENOENT
) {
214 * This is OK; it just means that no
215 * "packed-refs" file has been written yet,
216 * which is equivalent to it being empty.
220 die_errno("couldn't read %s", packed_refs_file
);
224 stat_validity_update(&packed_refs
->validity
, fileno(f
));
226 dir
= get_ref_dir(packed_refs
->cache
->root
);
227 while (strbuf_getwholeline(&line
, f
, '\n') != EOF
) {
228 struct object_id oid
;
232 if (skip_prefix(line
.buf
, "# pack-refs with:", &traits
)) {
233 if (strstr(traits
, " fully-peeled "))
234 peeled
= PEELED_FULLY
;
235 else if (strstr(traits
, " peeled "))
236 peeled
= PEELED_TAGS
;
237 /* perhaps other traits later as well */
241 refname
= parse_ref_line(&line
, &oid
);
243 int flag
= REF_ISPACKED
;
245 if (check_refname_format(refname
, REFNAME_ALLOW_ONELEVEL
)) {
246 if (!refname_is_safe(refname
))
247 die("packed refname is dangerous: %s", refname
);
249 flag
|= REF_BAD_NAME
| REF_ISBROKEN
;
251 last
= create_ref_entry(refname
, &oid
, flag
);
252 if (peeled
== PEELED_FULLY
||
253 (peeled
== PEELED_TAGS
&& starts_with(refname
, "refs/tags/")))
254 last
->flag
|= REF_KNOWS_PEELED
;
255 add_ref_entry(dir
, last
);
259 line
.buf
[0] == '^' &&
260 line
.len
== PEELED_LINE_LENGTH
&&
261 line
.buf
[PEELED_LINE_LENGTH
- 1] == '\n' &&
262 !get_oid_hex(line
.buf
+ 1, &oid
)) {
263 oidcpy(&last
->u
.value
.peeled
, &oid
);
265 * Regardless of what the file header said,
266 * we definitely know the value of *this*
269 last
->flag
|= REF_KNOWS_PEELED
;
274 strbuf_release(&line
);
280 * Check that the packed refs cache (if any) still reflects the
281 * contents of the file. If not, clear the cache.
283 static void validate_packed_ref_cache(struct packed_ref_store
*refs
)
286 !stat_validity_check(&refs
->cache
->validity
, refs
->path
))
287 clear_packed_ref_cache(refs
);
291 * Get the packed_ref_cache for the specified packed_ref_store,
292 * creating and populating it if it hasn't been read before or if the
293 * file has been changed (according to its `validity` field) since it
294 * was last read. On the other hand, if we hold the lock, then assume
295 * that the file hasn't been changed out from under us, so skip the
296 * extra `stat()` call in `stat_validity_check()`.
298 static struct packed_ref_cache
*get_packed_ref_cache(struct packed_ref_store
*refs
)
300 if (!is_lock_file_locked(&refs
->lock
))
301 validate_packed_ref_cache(refs
);
304 refs
->cache
= read_packed_refs(refs
->path
);
309 static struct ref_dir
*get_packed_ref_dir(struct packed_ref_cache
*packed_ref_cache
)
311 return get_ref_dir(packed_ref_cache
->cache
->root
);
314 static struct ref_dir
*get_packed_refs(struct packed_ref_store
*refs
)
316 return get_packed_ref_dir(get_packed_ref_cache(refs
));
320 * Add or overwrite a reference in the in-memory packed reference
321 * cache. This may only be called while the packed-refs file is locked
322 * (see packed_refs_lock()). To actually write the packed-refs file,
323 * call commit_packed_refs().
325 void add_packed_ref(struct ref_store
*ref_store
,
326 const char *refname
, const struct object_id
*oid
)
328 struct packed_ref_store
*refs
=
329 packed_downcast(ref_store
, REF_STORE_WRITE
,
331 struct ref_dir
*packed_refs
;
332 struct ref_entry
*packed_entry
;
334 if (!is_lock_file_locked(&refs
->lock
))
335 die("BUG: packed refs not locked");
337 if (check_refname_format(refname
, REFNAME_ALLOW_ONELEVEL
))
338 die("Reference has invalid format: '%s'", refname
);
340 packed_refs
= get_packed_refs(refs
);
341 packed_entry
= find_ref_entry(packed_refs
, refname
);
343 /* Overwrite the existing entry: */
344 oidcpy(&packed_entry
->u
.value
.oid
, oid
);
345 packed_entry
->flag
= REF_ISPACKED
;
346 oidclr(&packed_entry
->u
.value
.peeled
);
348 packed_entry
= create_ref_entry(refname
, oid
, REF_ISPACKED
);
349 add_ref_entry(packed_refs
, packed_entry
);
354 * Return the ref_entry for the given refname from the packed
355 * references. If it does not exist, return NULL.
357 static struct ref_entry
*get_packed_ref(struct packed_ref_store
*refs
,
360 return find_ref_entry(get_packed_refs(refs
), refname
);
363 static int packed_read_raw_ref(struct ref_store
*ref_store
,
364 const char *refname
, unsigned char *sha1
,
365 struct strbuf
*referent
, unsigned int *type
)
367 struct packed_ref_store
*refs
=
368 packed_downcast(ref_store
, REF_STORE_READ
, "read_raw_ref");
370 struct ref_entry
*entry
;
374 entry
= get_packed_ref(refs
, refname
);
380 hashcpy(sha1
, entry
->u
.value
.oid
.hash
);
381 *type
= REF_ISPACKED
;
385 static int packed_peel_ref(struct ref_store
*ref_store
,
386 const char *refname
, unsigned char *sha1
)
388 struct packed_ref_store
*refs
=
389 packed_downcast(ref_store
, REF_STORE_READ
| REF_STORE_ODB
,
391 struct ref_entry
*r
= get_packed_ref(refs
, refname
);
393 if (!r
|| peel_entry(r
, 0))
396 hashcpy(sha1
, r
->u
.value
.peeled
.hash
);
400 struct packed_ref_iterator
{
401 struct ref_iterator base
;
403 struct packed_ref_cache
*cache
;
404 struct ref_iterator
*iter0
;
408 static int packed_ref_iterator_advance(struct ref_iterator
*ref_iterator
)
410 struct packed_ref_iterator
*iter
=
411 (struct packed_ref_iterator
*)ref_iterator
;
414 while ((ok
= ref_iterator_advance(iter
->iter0
)) == ITER_OK
) {
415 if (iter
->flags
& DO_FOR_EACH_PER_WORKTREE_ONLY
&&
416 ref_type(iter
->iter0
->refname
) != REF_TYPE_PER_WORKTREE
)
419 if (!(iter
->flags
& DO_FOR_EACH_INCLUDE_BROKEN
) &&
420 !ref_resolves_to_object(iter
->iter0
->refname
,
425 iter
->base
.refname
= iter
->iter0
->refname
;
426 iter
->base
.oid
= iter
->iter0
->oid
;
427 iter
->base
.flags
= iter
->iter0
->flags
;
432 if (ref_iterator_abort(ref_iterator
) != ITER_DONE
)
438 static int packed_ref_iterator_peel(struct ref_iterator
*ref_iterator
,
439 struct object_id
*peeled
)
441 struct packed_ref_iterator
*iter
=
442 (struct packed_ref_iterator
*)ref_iterator
;
444 return ref_iterator_peel(iter
->iter0
, peeled
);
447 static int packed_ref_iterator_abort(struct ref_iterator
*ref_iterator
)
449 struct packed_ref_iterator
*iter
=
450 (struct packed_ref_iterator
*)ref_iterator
;
454 ok
= ref_iterator_abort(iter
->iter0
);
456 release_packed_ref_cache(iter
->cache
);
457 base_ref_iterator_free(ref_iterator
);
461 static struct ref_iterator_vtable packed_ref_iterator_vtable
= {
462 packed_ref_iterator_advance
,
463 packed_ref_iterator_peel
,
464 packed_ref_iterator_abort
467 static struct ref_iterator
*packed_ref_iterator_begin(
468 struct ref_store
*ref_store
,
469 const char *prefix
, unsigned int flags
)
471 struct packed_ref_store
*refs
;
472 struct packed_ref_iterator
*iter
;
473 struct ref_iterator
*ref_iterator
;
474 unsigned int required_flags
= REF_STORE_READ
;
476 if (!(flags
& DO_FOR_EACH_INCLUDE_BROKEN
))
477 required_flags
|= REF_STORE_ODB
;
478 refs
= packed_downcast(ref_store
, required_flags
, "ref_iterator_begin");
480 iter
= xcalloc(1, sizeof(*iter
));
481 ref_iterator
= &iter
->base
;
482 base_ref_iterator_init(ref_iterator
, &packed_ref_iterator_vtable
);
485 * Note that get_packed_ref_cache() internally checks whether
486 * the packed-ref cache is up to date with what is on disk,
487 * and re-reads it if not.
490 iter
->cache
= get_packed_ref_cache(refs
);
491 acquire_packed_ref_cache(iter
->cache
);
492 iter
->iter0
= cache_ref_iterator_begin(iter
->cache
->cache
, prefix
, 0);
500 * Write an entry to the packed-refs file for the specified refname.
501 * If peeled is non-NULL, write it as the entry's peeled value. On
502 * error, return a nonzero value and leave errno set at the value left
503 * by the failing call to `fprintf()`.
505 static int write_packed_entry(FILE *fh
, const char *refname
,
506 const unsigned char *sha1
,
507 const unsigned char *peeled
)
509 if (fprintf(fh
, "%s %s\n", sha1_to_hex(sha1
), refname
) < 0 ||
510 (peeled
&& fprintf(fh
, "^%s\n", sha1_to_hex(peeled
)) < 0))
516 int packed_refs_lock(struct ref_store
*ref_store
, int flags
, struct strbuf
*err
)
518 struct packed_ref_store
*refs
=
519 packed_downcast(ref_store
, REF_STORE_WRITE
| REF_STORE_MAIN
,
521 static int timeout_configured
= 0;
522 static int timeout_value
= 1000;
523 struct packed_ref_cache
*packed_ref_cache
;
525 if (!timeout_configured
) {
526 git_config_get_int("core.packedrefstimeout", &timeout_value
);
527 timeout_configured
= 1;
531 * Note that we close the lockfile immediately because we
532 * don't write new content to it, but rather to a separate
535 if (hold_lock_file_for_update_timeout(
538 flags
, timeout_value
) < 0) {
539 unable_to_lock_message(refs
->path
, errno
, err
);
543 if (close_lock_file(&refs
->lock
)) {
544 strbuf_addf(err
, "unable to close %s: %s", refs
->path
, strerror(errno
));
549 * Now that we hold the `packed-refs` lock, make sure that our
550 * cache matches the current version of the file. Normally
551 * `get_packed_ref_cache()` does that for us, but that
552 * function assumes that when the file is locked, any existing
553 * cache is still valid. We've just locked the file, but it
554 * might have changed the moment *before* we locked it.
556 validate_packed_ref_cache(refs
);
558 packed_ref_cache
= get_packed_ref_cache(refs
);
559 /* Increment the reference count to prevent it from being freed: */
560 acquire_packed_ref_cache(packed_ref_cache
);
564 void packed_refs_unlock(struct ref_store
*ref_store
)
566 struct packed_ref_store
*refs
= packed_downcast(
568 REF_STORE_READ
| REF_STORE_WRITE
,
569 "packed_refs_unlock");
571 if (!is_lock_file_locked(&refs
->lock
))
572 die("BUG: packed_refs_unlock() called when not locked");
573 rollback_lock_file(&refs
->lock
);
574 release_packed_ref_cache(refs
->cache
);
577 int packed_refs_is_locked(struct ref_store
*ref_store
)
579 struct packed_ref_store
*refs
= packed_downcast(
581 REF_STORE_READ
| REF_STORE_WRITE
,
582 "packed_refs_is_locked");
584 return is_lock_file_locked(&refs
->lock
);
588 * The packed-refs header line that we write out. Perhaps other
589 * traits will be added later. The trailing space is required.
591 static const char PACKED_REFS_HEADER
[] =
592 "# pack-refs with: peeled fully-peeled \n";
595 * Write the current version of the packed refs cache from memory to
596 * disk. The packed-refs file must already be locked for writing (see
597 * packed_refs_lock()). Return zero on success. On errors, rollback
598 * the lockfile, write an error message to `err`, and return a nonzero
601 int commit_packed_refs(struct ref_store
*ref_store
, struct strbuf
*err
)
603 struct packed_ref_store
*refs
=
604 packed_downcast(ref_store
, REF_STORE_WRITE
| REF_STORE_MAIN
,
605 "commit_packed_refs");
606 struct packed_ref_cache
*packed_ref_cache
=
607 get_packed_ref_cache(refs
);
609 struct strbuf sb
= STRBUF_INIT
;
611 struct ref_iterator
*iter
;
613 if (!is_lock_file_locked(&refs
->lock
))
614 die("BUG: commit_packed_refs() called when unlocked");
616 strbuf_addf(&sb
, "%s.new", refs
->path
);
617 if (create_tempfile(&refs
->tempfile
, sb
.buf
) < 0) {
618 strbuf_addf(err
, "unable to create file %s: %s",
619 sb
.buf
, strerror(errno
));
625 out
= fdopen_tempfile(&refs
->tempfile
, "w");
627 strbuf_addf(err
, "unable to fdopen packed-refs tempfile: %s",
632 if (fprintf(out
, "%s", PACKED_REFS_HEADER
) < 0) {
633 strbuf_addf(err
, "error writing to %s: %s",
634 get_tempfile_path(&refs
->tempfile
), strerror(errno
));
638 iter
= cache_ref_iterator_begin(packed_ref_cache
->cache
, NULL
, 0);
639 while ((ok
= ref_iterator_advance(iter
)) == ITER_OK
) {
640 struct object_id peeled
;
641 int peel_error
= ref_iterator_peel(iter
, &peeled
);
643 if (write_packed_entry(out
, iter
->refname
, iter
->oid
->hash
,
644 peel_error
? NULL
: peeled
.hash
)) {
645 strbuf_addf(err
, "error writing to %s: %s",
646 get_tempfile_path(&refs
->tempfile
),
648 ref_iterator_abort(iter
);
653 if (ok
!= ITER_DONE
) {
654 strbuf_addf(err
, "unable to rewrite packed-refs file: "
655 "error iterating over old contents");
659 if (rename_tempfile(&refs
->tempfile
, refs
->path
)) {
660 strbuf_addf(err
, "error replacing %s: %s",
661 refs
->path
, strerror(errno
));
668 delete_tempfile(&refs
->tempfile
);
673 * Rollback the lockfile for the packed-refs file, and discard the
674 * in-memory packed reference cache. (The packed-refs file will be
675 * read anew if it is needed again after this function is called.)
677 static void rollback_packed_refs(struct packed_ref_store
*refs
)
679 packed_assert_main_repository(refs
, "rollback_packed_refs");
681 if (!is_lock_file_locked(&refs
->lock
))
682 die("BUG: packed-refs not locked");
683 packed_refs_unlock(&refs
->base
);
684 clear_packed_ref_cache(refs
);
688 * Rewrite the packed-refs file, omitting any refs listed in
689 * 'refnames'. On error, leave packed-refs unchanged, write an error
690 * message to 'err', and return a nonzero value.
692 * The refs in 'refnames' needn't be sorted. `err` must not be NULL.
694 int repack_without_refs(struct ref_store
*ref_store
,
695 struct string_list
*refnames
, struct strbuf
*err
)
697 struct packed_ref_store
*refs
=
698 packed_downcast(ref_store
, REF_STORE_WRITE
| REF_STORE_MAIN
,
699 "repack_without_refs");
700 struct ref_dir
*packed
;
701 struct string_list_item
*refname
;
702 int needs_repacking
= 0, removed
= 0;
705 packed_assert_main_repository(refs
, "repack_without_refs");
708 /* Look for a packed ref */
709 for_each_string_list_item(refname
, refnames
) {
710 if (get_packed_ref(refs
, refname
->string
)) {
716 /* Avoid locking if we have nothing to do */
717 if (!needs_repacking
)
718 return 0; /* no refname exists in packed refs */
720 if (packed_refs_lock(&refs
->base
, 0, err
))
723 packed
= get_packed_refs(refs
);
725 /* Remove refnames from the cache */
726 for_each_string_list_item(refname
, refnames
)
727 if (remove_entry_from_dir(packed
, refname
->string
) != -1)
731 * All packed entries disappeared while we were
732 * acquiring the lock.
734 rollback_packed_refs(refs
);
738 /* Write what remains */
739 ret
= commit_packed_refs(&refs
->base
, err
);
740 packed_refs_unlock(ref_store
);
744 static int packed_init_db(struct ref_store
*ref_store
, struct strbuf
*err
)
750 static int packed_transaction_prepare(struct ref_store
*ref_store
,
751 struct ref_transaction
*transaction
,
754 die("BUG: not implemented yet");
757 static int packed_transaction_abort(struct ref_store
*ref_store
,
758 struct ref_transaction
*transaction
,
761 die("BUG: not implemented yet");
764 static int packed_transaction_finish(struct ref_store
*ref_store
,
765 struct ref_transaction
*transaction
,
768 die("BUG: not implemented yet");
771 static int packed_initial_transaction_commit(struct ref_store
*ref_store
,
772 struct ref_transaction
*transaction
,
775 return ref_transaction_commit(transaction
, err
);
778 static int packed_delete_refs(struct ref_store
*ref_store
, const char *msg
,
779 struct string_list
*refnames
, unsigned int flags
)
781 die("BUG: not implemented yet");
784 static int packed_pack_refs(struct ref_store
*ref_store
, unsigned int flags
)
787 * Packed refs are already packed. It might be that loose refs
788 * are packed *into* a packed refs store, but that is done by
789 * updating the packed references via a transaction.
794 static int packed_create_symref(struct ref_store
*ref_store
,
795 const char *refname
, const char *target
,
798 die("BUG: packed reference store does not support symrefs");
801 static int packed_rename_ref(struct ref_store
*ref_store
,
802 const char *oldrefname
, const char *newrefname
,
805 die("BUG: packed reference store does not support renaming references");
808 static struct ref_iterator
*packed_reflog_iterator_begin(struct ref_store
*ref_store
)
810 return empty_ref_iterator_begin();
813 static int packed_for_each_reflog_ent(struct ref_store
*ref_store
,
815 each_reflog_ent_fn fn
, void *cb_data
)
820 static int packed_for_each_reflog_ent_reverse(struct ref_store
*ref_store
,
822 each_reflog_ent_fn fn
,
828 static int packed_reflog_exists(struct ref_store
*ref_store
,
834 static int packed_create_reflog(struct ref_store
*ref_store
,
835 const char *refname
, int force_create
,
838 die("BUG: packed reference store does not support reflogs");
841 static int packed_delete_reflog(struct ref_store
*ref_store
,
847 static int packed_reflog_expire(struct ref_store
*ref_store
,
848 const char *refname
, const unsigned char *sha1
,
850 reflog_expiry_prepare_fn prepare_fn
,
851 reflog_expiry_should_prune_fn should_prune_fn
,
852 reflog_expiry_cleanup_fn cleanup_fn
,
853 void *policy_cb_data
)
858 struct ref_storage_be refs_be_packed
= {
861 packed_ref_store_create
,
863 packed_transaction_prepare
,
864 packed_transaction_finish
,
865 packed_transaction_abort
,
866 packed_initial_transaction_commit
,
870 packed_create_symref
,
874 packed_ref_iterator_begin
,
877 packed_reflog_iterator_begin
,
878 packed_for_each_reflog_ent
,
879 packed_for_each_reflog_ent_reverse
,
880 packed_reflog_exists
,
881 packed_create_reflog
,
882 packed_delete_reflog
,