aboutsummaryrefslogtreecommitdiffstats
path: root/refs
AgeCommit message (Expand)AuthorFilesLines
2018-10-30Merge branch 'bc/hash-transition-part-15'Junio C Hamano1-7/+7
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-16Merge branch 'rj/header-check'Junio C Hamano3-0/+9
2018-10-16Merge branch 'tq/refs-internal-comment-fix'Junio C Hamano1-1/+1
2018-10-16Merge branch 'ds/commit-graph-with-grafts'Junio C Hamano2-5/+6
2018-10-15refs/packed-backend: express constants using the_hash_algobrian m. carlson1-7/+7
2018-10-07Add a place for (not) sharing stuff between worktreesNguyễn Thái Ngọc Duy1-3/+11
2018-09-20refs/refs-internal.h: add missing declarations (hdr-check)Ramsay Jones1-0/+4
2018-09-20refs/packed-backend.h: add missing declaration (hdr-check)Ramsay Jones1-0/+2
2018-09-20refs/ref-cache.h: add missing declarations (hdr-check)Ramsay Jones1-0/+3
2018-09-17refs: docstring typoTao Qingyun1-1/+1
2018-08-29convert "oidcmp() != 0" to "!oideq()"Jeff King3-3/+3
2018-08-29convert "oidcmp() == 0" to oideq()Jeff King1-2/+2
2018-08-21refs.c: migrate internal ref iteration to pass thru repository argumentStefan Beller2-5/+6
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-24Merge branch 'bp/log-ref-write-fd-with-strbuf'Junio C Hamano2-23/+13
2018-07-24Merge branch 'bb/pedantic'Junio C Hamano1-0/+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 Peart2-23/+13
2018-07-09fixup! refs/refs-internal.h: avoid forward declaration of an enumJunio C Hamano1-1/+1
2018-07-09refs/refs-internal.h: avoid forward declaration of an enumBeat Bolli1-0/+2
2018-06-29object: add repository argument to parse_objectStefan Beller1-1/+1
2018-06-01refs/packed-backend.c: close fd of empty fileStefan Beller1-0/+1
2018-05-30Merge branch 'js/use-bug-macro'Junio C Hamano4-22/+22
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 Schindelin4-22/+22
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 King2-0/+9
2018-02-15Merge branch 'kg/packed-ref-cache-fix'Junio C Hamano1-51/+55
2018-02-13Merge branch 'sg/cocci-move-array'Junio C Hamano1-4/+2
2018-02-13Merge branch 'mr/packed-ref-store-fix'Junio C Hamano1-2/+1
2018-01-24packed_ref_cache: don't use mmap() for small filesKim Gybels1-1/+3
2018-01-24load_contents(): don't try to mmap an empty fileMichael Haggerty1-7/+6
2018-01-24packed_ref_iterator_begin(): make optimization more generalMichael Haggerty1-6/+6
2018-01-24find_reference_location(): make function safe for empty snapshotsMichael Haggerty1-4/+6
2018-01-24create_snapshot(): use `xmemdupz()` rather than a strbufMichael Haggerty1-5/+4
2018-01-24struct snapshot: store `start` rather than `header_len`Michael Haggerty1-31/+33
2018-01-22Use MOVE_ARRAYSZEDER Gábor1-4/+2
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 Hamano3-1/+120
2017-11-15Merge branch 'mh/tidy-ref-update-flags'Junio C Hamano4-108/+127
2017-11-15Merge branch 'mh/avoid-rewriting-packed-refs'Junio C Hamano3-1/+120
2017-11-06Merge branch 'bc/object-id'Junio C Hamano4-74/+72
2017-11-06refs: update some more docs to use "oid" rather than "sha1"Michael Haggerty4-22/+21
2017-11-06write_packed_entry(): take `object_id` argumentsMichael Haggerty1-8/+8
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 Haggerty2-22/+22
2017-11-06refs: tidy up and adjust visibility of the `ref_update` flagsMichael Haggerty2-52/+60
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 Haggerty3-1/+120
2017-10-28Merge branch 'bc/object-id' into baseMichael Haggerty4-74/+72
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. carlson3-13/+14
2017-10-16refs: convert peel_object to struct object_idbrian m. carlson3-6/+6
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. carlson3-8/+5
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. carlson2-8/+8
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/cleanup-strbuf-users'Junio C Hamano1-2/+2
2017-10-05Merge branch 'rs/resolve-ref-optional-result'Junio C Hamano1-2/+1
2017-10-03Merge branch 'mh/mmap-packed-refs'Junio C Hamano6-368/+818
2017-10-03Merge branch 'jk/read-in-full'Junio C Hamano1-1/+1
2017-10-03Merge branch 'sd/branch-copy'Junio C Hamano3-8/+50
2017-10-02use strbuf_addstr() for adding strings to strbufsRené Scharfe1-2/+2
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-25packed-backend.c: rename a bunch of things and update commentsMichael Haggerty1-190/+232
2017-09-25mmapped_ref_iterator: inline into `packed_ref_iterator`Michael Haggerty1-170/+114
2017-09-25ref_cache: remove support for storing peeled valuesMichael Haggerty3-72/+11
2017-09-25packed_ref_store: get rid of the `ref_cache` entirelyMichael Haggerty1-27/+2
2017-09-25ref_store: implement `refs_peel_ref()` genericallyMichael Haggerty3-77/+0
2017-09-25packed_read_raw_ref(): read the reference from the mmapped bufferMichael Haggerty1-5/+9
2017-09-25packed_ref_iterator_begin(): iterate using `mmapped_ref_iterator`Michael Haggerty1-3/+106
2017-09-25read_packed_refs(): ensure that references are ordered when readMichael Haggerty1-11/+212
2017-09-25packed_ref_cache: keep the `packed-refs` file mmapped if possibleMichael Haggerty1-42/+143
2017-09-25packed-backend.c: reorder some definitionsMichael Haggerty1-24/+24
2017-09-25mmapped_ref_iterator_advance(): no peeled value for broken refsMichael Haggerty1-2/+8
2017-09-25mmapped_ref_iterator: add iterator over a packed-refs fileMichael Haggerty1-55/+152
2017-09-25packed_ref_cache: remember the file-wide peeling stateMichael Haggerty1-5/+12
2017-09-25read_packed_refs(): read references with minimal copyingMichael Haggerty1-61/+40
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 Hamano4-216/+478
2017-09-19Merge branch 'jk/incore-lockfile-removal'Junio C Hamano2-34/+30
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-14read_packed_refs(): make parsing of the header line more robustMichael Haggerty1-6/+15
2017-09-14read_packed_refs(): only check for a header at the top of the fileMichael Haggerty1-11/+24
2017-09-14read_packed_refs(): use mmap to read the `packed-refs` fileMichael Haggerty1-10/+32
2017-09-14die_unterminated_line(), die_invalid_line(): new functionsMichael Haggerty1-3/+25
2017-09-14packed_ref_cache: add a backlink to the associated `packed_ref_store`Michael Haggerty1-7/+16
2017-09-14prefix_ref_iterator: break when we leave the prefixJeff King1-1/+31
2017-09-14ref_iterator: keep track of whether the iterator output is orderedMichael Haggerty6-19/+42
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-09packed-backend: rip out some now-unused codeMichael Haggerty2-201/+0
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 Haggerty2-2/+45
2017-09-09packed_ref_store: implement reference transactionsMichael Haggerty2-3/+319
2017-09-09struct ref_transaction: add a place for backends to store dataMichael Haggerty1-0/+1
2017-09-09packed-backend: don't adjust the reference count on lock/unlockMichael Haggerty1-5/+5
2017-09-06ref_lock: stop leaking lock_filesJeff King1-23/+16
2017-09-06tempfile: auto-allocate tempfiles on heapJeff King2-7/+8
2017-09-06lockfile: do not rollback lock on failed closeJeff King2-7/+9
2017-08-26Merge branch 'mh/ref-lock-entry'Junio C Hamano2-2/+12
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 Haggerty2-2/+12
2017-08-22Merge branch 'mh/packed-ref-store'Junio C Hamano4-564/+995
2017-08-17files-backend: cheapen refname_available check when locking refsMichael Haggerty1-4/+4
2017-07-27packed_ref_store: handle a packed-refs file that is a symlinkMichael Haggerty1-6/+18
2017-07-03read_packed_refs(): die if `packed-refs` contains bogus dataMichael Haggerty1-3/+7
2017-07-03repack_without_refs(): don't lock or unlock the packed refsMichael Haggerty2-40/+39
2017-06-26Merge branch 'mh/packed-ref-store-prep'Junio C Hamano1-9/+23
2017-06-24Merge branch 'ab/free-and-null'Junio C Hamano2-4/+2
2017-06-24Merge branch 'bw/config-h'Junio C Hamano1-0/+1
2017-06-23commit_packed_refs(): remove call to `packed_refs_unlock()`Michael Haggerty2-10/+10
2017-06-23clear_packed_ref_cache(): don't protest if the lock is heldMichael Haggerty1-2/+0
2017-06-23packed_refs_unlock(), packed_refs_is_locked(): new functionsMichael Haggerty2-6/+28
2017-06-23packed_refs_lock(): report errors via a `struct strbuf *err`Michael Haggerty3-13/+16
2017-06-23packed_refs_lock(): function renamed from lock_packed_refs()Michael Haggerty3-8/+8
2017-06-23commit_packed_refs(): use a staging file separate from the lockfileMichael Haggerty1-8/+32
2017-06-23commit_packed_refs(): report errors rather than dyingMichael Haggerty3-36/+61
2017-06-23packed_ref_store: make class into a subclass of `ref_store`Michael Haggerty4-45/+227
2017-06-23packed-backend: new module for handling packed referencesMichael Haggerty4-639/+666
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 Dua2-8/+42
2017-06-16*.[ch] refactoring: make use of the FREE_AND_NULL() macroÆvar Arnfjörð Bjarmason1-2/+1
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-24cache_ref_iterator_begin(): avoid priming unneeded directoriesMichael Haggerty1-10/+85
2017-05-23create_ref_entry(): remove `check_name` optionMichael Haggerty3-11/+10
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 Haggerty2-17/+26
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 Haggerty2-17/+8
2017-05-23ref_transaction_prepare(): new optional step for reference updatesMichael Haggerty2-23/+85
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 Haggerty2-3/+3
2017-05-23refs: use `size_t` indexes when iterating over ref transaction updatesMichael Haggerty1-2/+4
2017-05-23prefix_ref_iterator: don't trim too muchMichael Haggerty1-1/+17
2017-05-23files-backend: use `die("BUG: ...")`, not `die("internal error: ...")`Michael Haggerty1-4/+4
2017-05-23ref_iterator_begin_fn(): fix docstringMichael Haggerty1-3/+4
2017-05-23Merge branch 'bc/object-id'Junio C Hamano4-87/+79
2017-05-16Merge branch 'js/larger-timestamps'Junio C Hamano1-4/+4
2017-05-16Merge branch 'nd/worktree-kill-parse-ref'Junio C Hamano2-44/+4
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. carlson3-72/+60
2017-05-08refs: convert struct ref_update to use struct object_idbrian m. carlson2-16/+17
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 Hamano4-1082/+959
2017-04-24refs: kill set_worktree_head_symref()Nguyễn Thái Ngọc Duy1-44/+0
2017-04-24refs: add REFS_STORE_ALL_CAPSNguyễn Thái Ngọc Duy1-0/+4
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-16do_for_each_entry_in_dir(): delete functionMichael Haggerty2-32/+0