aboutsummaryrefslogtreecommitdiffstats
path: root/refs/files-backend.c
AgeCommit message (Expand)AuthorFilesLines
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
2017-10-16refs: convert delete_ref and refs_delete_ref to struct object_idbrian m. carlson1-1/+1
2017-10-16refs/files-backend: convert struct ref_to_prune to object_idbrian m. carlson1-3/+3
2017-10-05Merge branch 'rs/resolve-ref-optional-result'Junio C Hamano1-2/+1
2017-10-03Merge branch 'mh/mmap-packed-refs'Junio C Hamano1-45/+10
2017-10-03Merge branch 'jk/read-in-full'Junio C Hamano1-1/+1
2017-10-03Merge branch 'sd/branch-copy'Junio C Hamano1-8/+38
2017-10-01refs: pass NULL to refs_resolve_refdup() if hash is not neededRené Scharfe1-2/+1
2017-09-28Merge branch 'rs/resolve-ref-optional-result'Junio C Hamano1-2/+1
2017-09-26files-backend: prefer "0" for write_in_full() error checkJeff King1-1/+1
2017-09-25ref_store: implement `refs_peel_ref()` genericallyMichael Haggerty1-38/+0
2017-09-25Merge branch 'jk/write-in-full-fix'Junio C Hamano1-5/+5
2017-09-24refs: pass NULL to refs_resolve_ref_unsafe() if hash is not neededRené Scharfe1-2/+1
2017-09-19Merge branch 'mh/packed-ref-transactions'Junio C Hamano1-56/+158
2017-09-19Merge branch 'jk/incore-lockfile-removal'Junio C Hamano1-28/+22
2017-09-19Merge branch 'nd/prune-in-worktree'Junio C Hamano1-14/+45
2017-09-19Merge branch 'ma/split-symref-update-fix'Junio C Hamano1-18/+44
2017-09-14ref_iterator: keep track of whether the iterator output is orderedMichael Haggerty1-7/+9
2017-09-14convert less-trivial versions of "write_in_full() != len"Jeff King1-1/+1
2017-09-14avoid "write_in_full(fd, buf, len) != len" patternJeff King1-4/+4
2017-09-10refs/files-backend: add `refname`, not "HEAD", to listMartin Ågren1-3/+10
2017-09-10refs/files-backend: correct return value in lock_ref_for_updateMartin Ågren1-1/+1
2017-09-10refs/files-backend: fix memory leak in lock_ref_for_updateMartin Ågren1-11/+20
2017-09-10refs/files-backend: add longer-scoped copy of string to listMartin Ågren1-4/+14
2017-09-09files_transaction_finish(): delete reflogs before referencesMichael Haggerty1-14/+21
2017-09-09files_ref_store: use a transaction to update packed refsMichael Haggerty1-31/+101
2017-09-09files_initial_transaction_commit(): use a transaction for packed refsMichael Haggerty1-10/+19
2017-09-09prune_refs(): also free the linked listMichael Haggerty1-4/+10
2017-09-09files_pack_refs(): use a reference transaction to write packed refsMichael Haggerty1-7/+17
2017-09-09packed_delete_refs(): implement methodMichael Haggerty1-1/+1
2017-09-06ref_lock: stop leaking lock_filesJeff King1-23/+16
2017-09-06tempfile: auto-allocate tempfiles on heapJeff King1-2/+2
2017-09-06lockfile: do not rollback lock on failed closeJeff King1-6/+7
2017-08-26Merge branch 'mh/ref-lock-entry'Junio C Hamano1-2/+6
2017-08-24files-backend: make reflog iterator go through per-worktree reflogNguyễn Thái Ngọc Duy1-14/+45
2017-08-23refs: retry acquiring reference locks for 100msMichael Haggerty1-2/+6
2017-08-22Merge branch 'mh/packed-ref-store'Junio C Hamano1-564/+75
2017-08-17files-backend: cheapen refname_available check when locking refsMichael Haggerty1-4/+4
2017-07-03repack_without_refs(): don't lock or unlock the packed refsMichael Haggerty1-16/+31
2017-06-26Merge branch 'mh/packed-ref-store-prep'Junio C Hamano1-9/+23
2017-06-24Merge branch 'ab/free-and-null'Junio C Hamano1-2/+1
2017-06-24Merge branch 'bw/config-h'Junio C Hamano1-0/+1
2017-06-23commit_packed_refs(): remove call to `packed_refs_unlock()`Michael Haggerty1-0/+2
2017-06-23packed_refs_lock(): report errors via a `struct strbuf *err`Michael Haggerty1-4/+2
2017-06-23packed_refs_lock(): function renamed from lock_packed_refs()Michael Haggerty1-2/+2
2017-06-23commit_packed_refs(): report errors rather than dyingMichael Haggerty1-5/+5
2017-06-23packed_ref_store: make class into a subclass of `ref_store`Michael Haggerty1-8/+8
2017-06-23packed-backend: new module for handling packed referencesMichael Haggerty1-639/+1
2017-06-23packed_read_raw_ref(): new function, replacing `resolve_packed_ref()`Michael Haggerty1-19/+17
2017-06-23packed_ref_store: support iterationMichael Haggerty1-9/+110
2017-06-23packed_peel_ref(): new function, extracted from `files_peel_ref()`Michael Haggerty1-11/+15
2017-06-23repack_without_refs(): take a `packed_ref_store *` parameterMichael Haggerty1-10/+10
2017-06-23get_packed_ref(): take a `packed_ref_store *` parameterMichael Haggerty1-5/+7
2017-06-23rollback_packed_refs(): take a `packed_ref_store *` parameterMichael Haggerty1-8/+7
2017-06-23commit_packed_refs(): take a `packed_ref_store *` parameterMichael Haggerty1-9/+9
2017-06-23lock_packed_refs(): take a `packed_ref_store *` parameterMichael Haggerty1-9/+22
2017-06-23add_packed_ref(): take a `packed_ref_store *` parameterMichael Haggerty1-5/+5
2017-06-23get_packed_refs(): take a `packed_ref_store *` parameterMichael Haggerty1-5/+5
2017-06-23get_packed_ref_cache(): take a `packed_ref_store *` parameterMichael Haggerty1-14/+12
2017-06-23validate_packed_ref_cache(): take a `packed_ref_store *` parameterMichael Haggerty1-7/+6
2017-06-23clear_packed_ref_cache(): take a `packed_ref_store *` parameterMichael Haggerty1-8/+8
2017-06-23packed_ref_store: move `packed_refs_lock` member hereMichael Haggerty1-15/+16
2017-06-23packed_ref_store: move `packed_refs_path` hereMichael Haggerty1-13/+12
2017-06-23packed_ref_store: new structMichael Haggerty1-9/+33
2017-06-23add_packed_ref(): teach function to overwrite existing refsMichael Haggerty1-22/+18
2017-06-18branch: add a --copy (-c) option to go with --move (-m)Sahil Dua1-8/+38
2017-06-16coccinelle: make use of the "type" FREE_AND_NULL() ruleÆvar Arnfjörð Bjarmason1-2/+1
2017-06-15config: don't include config.h by defaultBrandon Williams1-0/+1
2017-06-12lock_packed_refs(): fix cache validity checkMichael Haggerty1-9/+23
2017-05-23create_ref_entry(): remove `check_name` optionMichael Haggerty1-4/+8
2017-05-23refs_ref_iterator_begin(): handle `GIT_REF_PARANOIA`Michael Haggerty1-7/+4
2017-05-23read_packed_refs(): report unexpected fopen() failuresMichael Haggerty1-2/+12
2017-05-23read_packed_refs(): do more of the work of reading packed refsMichael Haggerty1-16/+24
2017-05-23get_packed_ref_cache(): assume "packed-refs" won't change while lockedMichael Haggerty1-5/+11
2017-05-23should_pack_ref(): new function, extracted from `files_pack_refs()`Michael Haggerty1-14/+28
2017-05-23ref_update_reject_duplicates(): expose function to whole refs moduleMichael Haggerty1-17/+0
2017-05-23ref_transaction_prepare(): new optional step for reference updatesMichael Haggerty1-13/+50
2017-05-23ref_transaction_commit(): check for valid `transaction->state`Michael Haggerty1-3/+0
2017-05-23files_transaction_cleanup(): new helper functionMichael Haggerty1-9/+24
2017-05-23files_ref_store: put the packed files lock directly in this structMichael Haggerty1-18/+11
2017-05-23files-backend: move `lock` member to `files_ref_store`Michael Haggerty1-19/+17
2017-05-23ref_store: take a `msg` parameter when deleting referencesMichael Haggerty1-2/+2
2017-05-23refs: use `size_t` indexes when iterating over ref transaction updatesMichael Haggerty1-2/+4
2017-05-23files-backend: use `die("BUG: ...")`, not `die("internal error: ...")`Michael Haggerty1-4/+4
2017-05-23Merge branch 'bc/object-id'Junio C Hamano1-82/+74
2017-05-16Merge branch 'js/larger-timestamps'Junio C Hamano1-4/+4
2017-05-16Merge branch 'nd/worktree-kill-parse-ref'Junio C Hamano1-44/+0
2017-05-08object: convert parse_object* to take struct object_idbrian m. carlson1-1/+1
2017-05-08refs/files-backend: convert many internals to struct object_idbrian m. carlson1-69/+57
2017-05-08refs: convert struct ref_update to use struct object_idbrian m. carlson1-14/+15
2017-05-08reflog_expire: convert to struct object_idbrian m. carlson1-2/+5
2017-04-27timestamp_t: a new data type for timestampsJohannes Schindelin1-2/+2
2017-04-26Merge branch 'mh/separate-ref-cache'Junio C Hamano1-1075/+154
2017-04-24refs: kill set_worktree_head_symref()Nguyễn Thái Ngọc Duy1-44/+0
2017-04-23Merge branch 'rs/misc-cppcheck-fixes'Junio C Hamano1-8/+12
2017-04-23PRItime: introduce a new "printf format" for timestampsJohannes Schindelin1-1/+1
2017-04-23parse_timestamp(): specify explicitly where we parse timestampsJohannes Schindelin1-1/+1
2017-04-17files_for_each_reflog_ent_reverse(): close stream and free strbuf on errorRené Scharfe1-8/+12
2017-04-16files_pack_refs(): use reference iterationMichael Haggerty1-83/+60
2017-04-16commit_packed_refs(): use reference iterationMichael Haggerty1-21/+17
2017-04-16cache_ref_iterator_begin(): make function smarterMichael Haggerty1-31/+13
2017-04-16get_loose_ref_cache(): new functionMichael Haggerty1-2/+7
2017-04-16get_loose_ref_dir(): function renamed from get_loose_refs()Michael Haggerty1-3/+3
2017-04-16do_for_each_entry_in_dir(): eliminate `offset` argumentMichael Haggerty1-2/+2
2017-04-16refs: handle "refs/bisect/" in `loose_fill_ref_dir()`Michael Haggerty1-0/+15
2017-04-16ref-cache: use a callback function to fill the cacheMichael Haggerty1-4/+6
2017-04-16refs: record the ref_store in ref_cache, not ref_dirMichael Haggerty1-3/+3
2017-04-16ref-cache: introduce a new type, ref_cacheMichael Haggerty1-11/+17
2017-04-16refs: split `ref_cache` code into separate filesMichael Haggerty1-733/+3
2017-04-16ref-cache: rename `remove_entry()` to `remove_entry_from_dir()`Michael Haggerty1-2/+2
2017-04-16ref-cache: rename `find_ref()` to `find_ref_entry()`Michael Haggerty1-3/+3
2017-04-16ref-cache: rename `add_ref()` to `add_ref_entry()`Michael Haggerty1-4/+4
2017-04-16refs_verify_refname_available(): use function in more placesMichael Haggerty1-160/+11
2017-04-16refs_verify_refname_available(): implement once for all backendsMichael Haggerty1-31/+8
2017-04-14get_ref_dir(): don't call read_loose_refs() for "refs/bisect"Michael Haggerty1-2/+0
2017-04-14files-backend: avoid ref api targeting main ref storeNguyễn Thái Ngọc Duy1-35/+49
2017-04-14refs: add new ref-store apiNguyễn Thái Ngọc Duy1-6/+7
2017-04-14files-backend: replace submodule_allowed check in files_downcast()Nguyễn Thái Ngọc Duy1-32/+54
2017-03-27refs: move submodule code out of files-backend.cNguyễn Thái Ngọc Duy1-22/+2
2017-03-27refs.c: make get_main_ref_store() public and use itNguyễn Thái Ngọc Duy1-1/+1
2017-03-27files-backend: remove the use of git_path()Nguyễn Thái Ngọc Duy1-5/+38
2017-03-27files-backend: add and use files_ref_path()Nguyễn Thái Ngọc Duy1-24/+23
2017-03-27files-backend: add and use files_reflog_path()Nguyễn Thái Ngọc Duy1-56/+86
2017-03-27files-backend: move "logs/" out of TMP_RENAMED_LOGNguyễn Thái Ngọc Duy1-5/+5
2017-03-27files-backend: convert git_path() to strbuf_git_path()Nguyễn Thái Ngọc Duy1-33/+97
2017-03-27files-backend: make sure files_rename_ref() always reach the endNguyễn Thái Ngọc Duy1-14/+28
2017-03-27files-backend: add and use files_packed_refs_path()Nguyễn Thái Ngọc Duy1-11/+18
2017-03-27files-backend: delete dead code in files_init_db()Nguyễn Thái Ngọc Duy1-4/+0
2017-03-27files-backend.c: delete dead code in files_ref_iterator_begin()Nguyễn Thái Ngọc Duy1-3/+0
2017-03-27files-backend: make files_log_ref_write() staticNguyễn Thái Ngọc Duy1-3/+6
2017-03-17Merge branch 'bc/object-id'Junio C Hamano1-14/+15
2017-02-27Merge branch 'km/delete-ref-reflog-message'Junio C Hamano1-5/+5
2017-02-27Merge branch 'mh/submodule-hash'Junio C Hamano1-31/+46
2017-02-27Merge branch 'mh/ref-remove-empty-directory'Junio C Hamano1-184/+187
2017-02-22refs: simplify parsing of reflog entriesbrian m. carlson1-5/+6