aboutsummaryrefslogtreecommitdiffstats
path: root/refs/files-backend.c
AgeCommit message (Expand)AuthorFilesLines
2024-08-08fsck: add ref name check for files backendshejialuo1-0/+31
2024-08-08files-backend: add unified interface for refs scanningshejialuo1-1/+72
2024-08-08refs: set up ref consistency check infrastructureshejialuo1-1/+12
2024-07-02Merge branch 'ps/use-the-repository'Junio C Hamano1-3/+5
2024-06-20Merge branch 'kn/update-ref-symref'Junio C Hamano1-8/+9
2024-06-17Merge branch 'ps/ref-storage-migration'Junio C Hamano1-14/+110
2024-06-14global: introduce `USE_THE_REPOSITORY_VARIABLE` macroPatrick Steinhardt1-0/+2
2024-06-14hash: require hash algorithm in `oidread()` and `oidclr()`Patrick Steinhardt1-3/+3
2024-06-13Merge branch 'ps/ref-storage-migration' into ps/use-the-repositoryJunio C Hamano1-14/+110
2024-06-07refs: specify error for regular refs with `old_target`Karthik Nayak1-6/+8
2024-06-07refs: create and use `ref_update_expects_existing_old_ref()`Karthik Nayak1-2/+1
2024-06-06refs: implement removal of ref storagesPatrick Steinhardt1-0/+62
2024-06-06refs/files: extract function to iterate through root refsPatrick Steinhardt1-9/+42
2024-06-06refs/files: refactor `add_pseudoref_and_head_entries()`Patrick Steinhardt1-9/+6
2024-06-06refs: allow to skip creation of reflog entriesPatrick Steinhardt1-0/+4
2024-05-30Merge branch 'ps/refs-without-the-repository-updates'Junio C Hamano1-23/+36
2024-05-28Merge branch 'ps/pseudo-ref-terminology'Junio C Hamano1-2/+1
2024-05-23Merge branch 'it/refs-name-conflict'Junio C Hamano1-1/+3
2024-05-23Merge branch 'ps/pseudo-ref-terminology' into ps/ref-storage-migrationJunio C Hamano1-2/+1
2024-05-23Merge branch 'ps/refs-without-the-repository-updates' into ps/ref-storage-mig...Junio C Hamano1-23/+36
2024-05-17refs/files: remove references to `the_hash_algo`Patrick Steinhardt1-2/+2
2024-05-17refs/files: use correct repositoryPatrick Steinhardt1-10/+13
2024-05-17refs: implement releasing ref storagesPatrick Steinhardt1-0/+10
2024-05-17refs: rename `init_db` callback to avoid confusionPatrick Steinhardt1-6/+6
2024-05-17refs: adjust names for `init` and `init_db` callbacksPatrick Steinhardt1-5/+5
2024-05-15refs: classify HEAD as a root refPatrick Steinhardt1-2/+1
2024-05-15refs: do not check ref existence in `is_root_ref()`Patrick Steinhardt1-2/+2
2024-05-15refs: rename `is_pseudoref()` to `is_root_ref()`Patrick Steinhardt1-1/+1
2024-05-07refs: remove `create_symref` and associated dead codeKarthik Nayak1-67/+0
2024-05-07refs: add support for transactional symref updatesKarthik Nayak1-21/+92
2024-05-07refs: move `original_update_refname` to 'refs.c'Karthik Nayak1-16/+5
2024-05-07files-backend: extract out `create_symref_lock()`Karthik Nayak1-14/+37
2024-05-07refs: accept symref values in `ref_transaction_update()`Karthik Nayak1-6/+6
2024-05-06refs: return conflict error when checking packed refsIvan Tse1-1/+3
2024-03-05Merge branch 'kn/for-all-refs'Junio C Hamano1-34/+93
2024-02-23refs: introduce `refs_for_each_include_root_refs()`Karthik Nayak1-5/+60
2024-02-23refs: extract out `loose_fill_ref_dir_regular_file()`Karthik Nayak1-29/+33
2024-02-21refs: stop resolving ref corresponding to reflogsPatrick Steinhardt1-10/+2
2024-02-21refs: drop unused params from the reflog iterator callbackPatrick Steinhardt1-7/+1
2024-02-21refs: always treat iterators as orderedPatrick Steinhardt1-4/+3
2024-02-21refs/files: sort merged worktree and common reflogsPatrick Steinhardt1-28/+2
2024-02-21refs/files: sort reflogs returned by the reflog iteratorPatrick Steinhardt1-2/+2
2024-01-26Merge branch 'ps/worktree-refdb-initialization'Junio C Hamano1-6/+31
2024-01-16Merge branch 'ps/refstorage-extension'Junio C Hamano1-1/+0
2024-01-08Merge branch 'en/header-cleanup'Junio C Hamano1-2/+0
2024-01-08refs/files: skip creation of "refs/{heads,tags}" for worktreesPatrick Steinhardt1-8/+14
2024-01-08setup: move creation of "refs/" into the files backendPatrick Steinhardt1-0/+17
2024-01-08refs: prepare `refs_init_db()` for initializing worktree refsPatrick Steinhardt1-1/+3
2024-01-02refs: refactor logic to look up storage backendsPatrick Steinhardt1-1/+0
2023-12-26treewide: remove unnecessary includes in source filesElijah Newren1-2/+0
2023-11-17refs: remove `delete_refs` callback from backendsPatrick Steinhardt1-7/+0
2023-11-17refs: deduplicate code to delete referencesPatrick Steinhardt1-45/+1
2023-11-17refs/files: use transactions to delete referencesPatrick Steinhardt1-32/+34
2023-10-09files-backend.c: avoid stat in 'loose_fill_ref_dir'Victoria Dye1-9/+5
2023-07-21Merge branch 'tb/refs-exclusion-and-packed-refs'Junio C Hamano1-2/+3
2023-07-10refs: plumb `exclude_patterns` argument throughoutTaylor Blau1-2/+3
2023-06-21repository: remove unnecessary include of path.hElijah Newren1-0/+1
2023-06-21cache.h: remove this no-longer-used headerElijah Newren1-1/+1
2023-06-13Merge branch 'jc/pack-ref-exclude-include'Junio C Hamano1-10/+17
2023-05-12pack-refs: teach pack-refs --include optionJohn Cai1-8/+10
2023-05-12pack-refs: teach --exclude option to exclude refs from being packedJohn Cai1-6/+10
2023-04-24hash-ll.h: split out of hash.h to remove dependency on repository.hElijah Newren1-0/+1
2023-04-24copy.h: move declarations for copy.c functions from cache.hElijah Newren1-0/+1
2023-04-11object-file.h: move declarations for object-file.c functions from cache.hElijah Newren1-0/+1
2023-03-21write-or-die.h: move declarations for write-or-die.c functions from cache.hElijah Newren1-0/+1
2023-03-21setup.h: move declarations for setup.c functions from cache.hElijah Newren1-0/+1
2023-03-21environment.h: move declarations for environment.c functions from cache.hElijah Newren1-0/+1
2023-03-21wrapper.h: move declarations for wrapper.c functions from cache.hElijah Newren1-1/+2
2023-03-21treewide: be explicit about dependence on gettext.hElijah Newren1-0/+1
2023-02-23ident.h: move ident-related declarations out of cache.hElijah Newren1-0/+1
2023-02-23cache.h: remove dependence on hex.h; make other files include it explicitlyElijah Newren1-0/+1
2022-09-19refs: unify parse_worktree_ref() and ref_type()Han-Wen Nienhuys1-44/+36
2022-09-01git-compat-util.h: use "UNUSED", not "UNUSED(var)"Ævar Arnfjörð Bjarmason1-7/+7
2022-08-19refs: mark unused virtual method parametersJeff King1-5/+5
2022-08-19refs: mark unused each_ref_fn parametersJeff King1-1/+3
2022-04-13Revert "Merge branch 'ps/avoid-unnecessary-hook-invocation-with-packed-refs'"Junio C Hamano1-19/+7
2022-03-29Merge branch 'ab/refs-various-fixes'Junio C Hamano1-32/+32
2022-03-25Merge branch 'ps/fsync-refs'Junio C Hamano1-0/+1
2022-03-17refs: use designated initializers for "struct ref_iterator_vtable"Ævar Arnfjörð Bjarmason1-6/+6
2022-03-17refs: use designated initializers for "struct ref_storage_be"Ævar Arnfjörð Bjarmason1-26/+26
2022-03-15core.fsync: new option to harden referencesPatrick Steinhardt1-0/+1
2022-03-01refs/files-backend: optimize reading of symbolic refsPatrick Steinhardt1-6/+28
2022-03-01refs: add ability for backends to special-case reading of symbolic refsPatrick Steinhardt1-0/+1
2022-02-18Merge branch 'ps/avoid-unnecessary-hook-invocation-with-packed-refs'Junio C Hamano1-7/+19
2022-01-26refs API: remove "failure_errno" from refs_resolve_ref_unsafe()Ævar Arnfjörð Bjarmason1-22/+9
2022-01-17refs: skip hooks when deleting uncovered packed refsPatrick Steinhardt1-3/+6
2022-01-17refs: do not execute reference-transaction hook on packing refsPatrick Steinhardt1-2/+4
2022-01-17refs: allow passing flags when beginning transactionsPatrick Steinhardt1-5/+5
2022-01-17refs: extract packed_refs_delete_refs() to allow control of transactionPatrick Steinhardt1-3/+10
2022-01-14Merge branch 'ab/refs-errno-cleanup'Junio C Hamano1-2/+1
2022-01-13refs API: use "failure_errno", not "errno"Ævar Arnfjörð Bjarmason1-2/+1
2022-01-10Merge branch 'ab/reflog-prep'Junio C Hamano1-24/+20
2021-12-22reflog + refs-backend: move "verbose" out of the backendÆvar Arnfjörð Bjarmason1-24/+20
2021-12-22refs files-backend: assume cb->newlog if !EXPIRE_REFLOGS_DRY_RUNÆvar Arnfjörð Bjarmason1-2/+2
2021-12-22refs: centralize initialization of the base ref_store.Han-Wen Nienhuys1-4/+1
2021-12-22refs: pass gitdir to packed_ref_store_createHan-Wen Nienhuys1-3/+2
2021-12-15Merge branch 'hn/allow-bogus-oid-in-ref-tests'Junio C Hamano1-23/+30
2021-12-10Merge branch 'hn/create-reflog-simplify'Junio C Hamano1-3/+2
2021-12-07refs: introduce REF_SKIP_OID_VERIFICATION flagHan-Wen Nienhuys1-21/+29
2021-12-07refs: update comment.Han-Wen Nienhuys1-2/+1
2021-11-29Merge branch 'ab/refs-errno-cleanup'Junio C Hamano1-51/+102
2021-11-22refs: drop force_create argument of create_reflog APIHan-Wen Nienhuys1-3/+2
2021-10-25Merge branch 'jt/no-abuse-alternate-odb-for-submodules'Junio C Hamano1-5/+11
2021-10-16refs API: post-migration API renaming [2/2]Ævar Arnfjörð Bjarmason1-9/+9
2021-10-16refs API: make files_copy_or_rename_ref() et al not set errnoÆvar Arnfjörð Bjarmason1-4/+6
2021-10-16refs API: make loose_fill_ref_dir() not set errnoÆvar Arnfjörð Bjarmason1-2/+3
2021-10-16refs API: remove refs_read_ref_full() wrapperÆvar Arnfjörð Bjarmason1-14/+22
2021-10-16refs/files: remove "name exist?" check in lock_ref_oid_basic()Ævar Arnfjörð Bjarmason1-24/+24
2021-10-16refs API: make refs_rename_ref_available() staticÆvar Arnfjörð Bjarmason1-0/+29
2021-10-16refs API: make parse_loose_ref_contents() not set errnoHan-Wen Nienhuys1-11/+20
2021-10-16refs API: make refs_read_raw_ref() not set errnoHan-Wen Nienhuys1-4/+6
2021-10-11Merge branch 'jk/ref-paranoia'Junio C Hamano1-0/+5
2021-10-08refs: peeling non-the_repository iterators is BUGJonathan Tan1-2/+3
2021-10-08refs: teach arbitrary repo support to iteratorsJonathan Tan1-1/+4
2021-10-08refs: plumb repo into ref storesJonathan Tan1-2/+4
2021-10-06Merge branch 'ab/retire-refs-unused-funcs'Junio C Hamano1-3/+3
2021-10-03Merge branch 'hn/refs-errno-cleanup'Junio C Hamano1-23/+126
2021-10-03Merge branch 'ab/refs-files-cleanup'Junio C Hamano1-97/+35
2021-09-28refs/ref-cache.[ch]: remove "incomplete" from create_dir_entry()Ævar Arnfjörð Bjarmason1-3/+3
2021-09-27refs: add DO_FOR_EACH_OMIT_DANGLING_SYMREFS flagJeff King1-0/+5
2021-09-09refs/files-backend: remove unused open mode parameterRené Scharfe1-1/+1
2021-08-25refs: make errno output explicit for read_raw_ref_fnHan-Wen Nienhuys1-14/+15
2021-08-25refs/files-backend: stop setting errno from lock_ref_oid_basicHan-Wen Nienhuys1-9/+2
2021-08-25refs file backend: move raceproof_create_file() hereÆvar Arnfjörð Bjarmason1-0/+109
2021-08-25refs/files: remove unused "errno != ENOTDIR" conditionÆvar Arnfjörð Bjarmason1-2/+1
2021-08-25refs/files: remove unused "errno == EISDIR" codeÆvar Arnfjörð Bjarmason1-25/+3
2021-08-25refs/files: remove unused "oid" in lock_ref_oid_basic()Ævar Arnfjörð Bjarmason1-56/+14
2021-08-25refs API: remove OID argument to reflog_expire()Ævar Arnfjörð Bjarmason1-2/+1
2021-08-25reflog expire: don't lock reflogs using previously seen OIDÆvar Arnfjörð Bjarmason1-2/+5
2021-08-25refs/files: add a comment about refs_reflog_exists() callÆvar Arnfjörð Bjarmason1-0/+13
2021-08-25refs/files: remove unused "skip" in lock_raw_ref() tooÆvar Arnfjörð Bjarmason1-5/+4
2021-08-25refs/files: remove unused "extras/skip" in lock_ref_oid_basic()Ævar Arnfjörð Bjarmason1-15/+7
2021-08-25refs: drop unused "flags" parameter to lock_ref_oid_basic()Jeff King1-7/+6
2021-08-19refs/files: remove unused REF_DELETING in lock_ref_oid_basic()Ævar Arnfjörð Bjarmason1-2/+0
2021-05-16Merge branch 'wc/packed-ref-removal-cleanup'Junio C Hamano1-6/+6
2021-05-11refs: cleanup directories when deleting packed refWill Chandler1-6/+6
2021-04-27hash: provide per-algorithm null OIDsbrian m. carlson1-1/+1
2021-03-13use CALLOC_ARRAYRené Scharfe1-5/+5
2021-01-06refs/files-backend: don't peek into `struct lock_file`Martin Ågren1-2/+2
2020-09-08refs: move REF_LOG_ONLY to refs-internal.hHan-Wen Nienhuys1-7/+0
2020-08-19refs: move gitdir into base ref_storeHan-Wen Nienhuys1-9/+6
2020-08-19refs: split off reading loose ref data in separate functionHan-Wen Nienhuys1-15/+19
2020-07-31refs: move the logic to add \t to reflog to the files backendHan-Wen Nienhuys1-1/+3
2020-07-10reflog: cleanse messages in the refs.c layerJunio C Hamano1-1/+1
2020-03-30refs: fix segfault when aborting empty transactionPatrick Steinhardt1-8/+10
2020-01-31C: use skip_prefix() to avoid hardcoded string lengthJunio C Hamano1-2/+1
2019-12-11refs: pass NULL to refs_read_ref_full() because object ID is not neededRené Scharfe1-2/+2
2019-08-07dir-iterator: release strbuf after useRené Scharfe1-1/+3
2019-07-11dir-iterator: add flags parameter to dir_iterator_beginMatheus Tavares1-1/+1
2019-07-11dir-iterator: refactor state machine modelMatheus Tavares1-4/+13
2019-04-16Merge branch 'jk/refs-double-abort'Junio C Hamano1-1/+15
2019-04-10Merge branch 'nd/rewritten-ref-is-per-worktree'Junio C Hamano1-22/+28
2019-03-22refs/files-backend: don't look at an aborted transactionJeff King1-1/+5
2019-03-22refs/files-backend: handle packed transaction prepare failureJeff King1-0/+10
2019-03-08Make sure refs/rewritten/ is per-worktreeNguyễn Thái Ngọc Duy1-2/+2
2019-03-08files-backend.c: reduce duplication in add_per_worktree_entries_to_dir()Nguyễn Thái Ngọc Duy1-11/+11
2019-03-08files-backend.c: factor out per-worktree code in loose_fill_ref_dir()Nguyễn Thái Ngọc Duy1-22/+28
2019-02-14files-backend: drop refs parameter from split_symref_update()Jeff King1-3/+2
2018-11-26files-backend.c: fix build error on SolarisNguyễn Thái Ngọc Duy1-1/+2
2018-10-22refs: new ref types to make per-worktree refs visible to all worktreesNguyễn Thái Ngọc Duy1-0/+28
2018-10-07Add a place for (not) sharing stuff between worktreesNguyễn Thái Ngọc Duy1-3/+11
2018-08-29convert "oidcmp() != 0" to "!oideq()"Jeff King1-1/+1
2018-08-29convert "oidcmp() == 0" to oideq()Jeff King1-2/+2
2018-08-15Merge branch 'jk/size-t'Junio C Hamano1-1/+1
2018-08-02Merge branch 'sb/object-store-lookup'Junio C Hamano1-1/+1
2018-08-02Merge branch 'bc/object-id'Junio C Hamano1-2/+2
2018-07-24pass st.st_size as hint for strbuf_readlink()Jeff King1-1/+1
2018-07-16refs/files-backend: use the_hash_algo for writing refsbrian m. carlson1-2/+2
2018-07-10convert log_ref_write_fd() to use strbufBen Peart1-19/+10
2018-06-29object: add repository argument to parse_objectStefan Beller1-1/+1
2018-05-30Merge branch 'js/use-bug-macro'Junio C Hamano1-10/+10
2018-05-30Merge branch 'ma/lockfile-cleanup'Junio C Hamano1-1/+1
2018-05-10lock_file: make function-local locks non-staticMartin Ågren1-1/+1
2018-05-08Merge branch 'sb/object-store-replace'Junio C Hamano1-4/+0
2018-05-06Replace all die("BUG: ...") calls by BUG() onesJohannes Schindelin1-10/+10
2018-04-12refs: store the main ref store inside the repository structStefan Beller1-4/+0
2018-03-30refs: use chdir_notify to update cached relative pathsJeff King1-0/+6
2018-02-13Merge branch 'mr/packed-ref-store-fix'Junio C Hamano1-2/+1
2018-01-19files_initial_transaction_commit(): only unlock if lockedMathias Rav1-2/+1
2017-12-06Merge branch 'mh/avoid-rewriting-packed-refs' into maintJunio C Hamano1-1/+17
2017-11-15Merge branch 'mh/tidy-ref-update-flags'Junio C Hamano1-38/+94
2017-11-15Merge branch 'mh/avoid-rewriting-packed-refs'Junio C Hamano1-1/+17
2017-11-06Merge branch 'bc/object-id'Junio C Hamano1-57/+55
2017-11-06refs: update some more docs to use "oid" rather than "sha1"Michael Haggerty1-10/+9
2017-11-06refs: rename constant `REF_ISPRUNING` to `REF_IS_PRUNING`Michael Haggerty1-9/+9
2017-11-06refs: rename constant `REF_NODEREF` to `REF_NO_DEREF`Michael Haggerty1-20/+20
2017-11-06refs: tidy up and adjust visibility of the `ref_update` flagsMichael Haggerty1-0/+45
2017-11-06ref_transaction_add_update(): remove a checkMichael Haggerty1-1/+6
2017-11-06prune_ref(): call `ref_transaction_add_update()` directlyMichael Haggerty1-9/+16
2017-11-06files_transaction_prepare(): don't leak flags to packed transactionMichael Haggerty1-2/+2
2017-10-30files-backend: don't rewrite the `packed-refs` file unnecessarilyMichael Haggerty1-1/+17
2017-10-28Merge branch 'bc/object-id' into baseMichael Haggerty1-57/+55
2017-10-26Merge branch 'mh/ref-locking-fix'Junio C Hamano1-1/+1
2017-10-25files_transaction_prepare(): fix handling of ref lock failureMichael Haggerty1-1/+1
2017-10-16refs/files-backend: convert static functions to object_idbrian m. carlson1-28/+28
2017-10-16refs: convert read_raw_ref backends to struct object_idbrian m. carlson1-6/+7
2017-10-16refs: convert resolve_ref_unsafe to struct object_idbrian m. carlson1-4/+4
2017-10-16refs: convert reflog_expire parameter to struct object_idbrian m. carlson1-6/+3
2017-10-16refs: convert read_ref and read_ref_full to object_idbrian m. carlson1-5/+5
2017-10-16refs: update ref transactions to use struct object_idbrian m. carlson1-6/+6