aboutsummaryrefslogtreecommitdiffstats
path: root/refs.c
AgeCommit message (Expand)AuthorFilesLines
2016-08-01pass constants as first argument to st_mult()René Scharfe1-1/+1
2016-06-20do_for_each_ref(): reimplement using reference iterationMichael Haggerty1-0/+20
2016-06-13ref_transaction_update(): check refname_is_safe() at a minimumMichael Haggerty1-2/+3
2016-06-13add_update(): initialize the whole ref_updateMichael Haggerty1-22/+26
2016-06-13ref_transaction_create(): disallow recursive pruningMichael Haggerty1-0/+3
2016-06-13refs: make error messages more consistentMichael Haggerty1-4/+4
2016-05-05refname_is_safe(): insist that the refname already be normalizedMichael Haggerty1-2/+7
2016-05-05refname_is_safe(): don't allow the empty stringMichael Haggerty1-2/+3
2016-05-05refname_is_safe(): use skip_prefix()Michael Haggerty1-3/+5
2016-04-10refs: move resolve_ref_unsafe into common codeDavid Turner1-0/+74
2016-04-10refs: move for_each_*ref* functions into common codeDavid Turner1-0/+52
2016-04-10refs: move head_ref{,_submodule} to the common codeDavid Turner1-0/+23
2016-02-22use st_add and st_mult for allocation size computationJeff King1-1/+1
2016-02-22convert trivial cases to FLEX_ARRAY macrosJeff King1-4/+2
2016-02-22use xmallocz to avoid size arithmeticJeff King1-1/+1
2015-12-10Merge branch 'bc/object-id'Junio C Hamano1-1/+1
2015-12-08Merge branch 'dt/refs-backend-pre-vtable'Junio C Hamano1-3669/+42
2015-11-20Remove get_object_hash.brian m. carlson1-1/+1
2015-11-20Add several uses of get_object_hash.brian m. carlson1-1/+1
2015-11-20refs: break out ref conflict checksDavid Turner1-0/+44
2015-11-20refs: split filesystem-based refs code into a new fileMichael Haggerty1-3535/+4
2015-11-20refs/refs-internal.h: new header fileMichael Haggerty1-165/+9
2015-11-20refname_is_safe(): improve docstringMichael Haggerty1-6/+10
2015-11-20pack_if_possible_fn(): use ref_type() instead of is_per_worktree_ref()Michael Haggerty1-3/+1
2015-11-20copy_msg(): rename to copy_reflog_msg()David Turner1-2/+2
2015-11-20verify_refname_available(): new functionRonnie Sahlberg1-26/+40
2015-11-20verify_refname_available(): rename functionRonnie Sahlberg1-22/+22
2015-11-05hideRefs: add support for matching full refsLukas Fleischer1-3/+12
2015-10-20Merge branch 'jk/war-on-sprintf'Junio C Hamano1-37/+39
2015-10-05Merge branch 'kn/for-each-tag'Junio C Hamano1-0/+9
2015-10-05use strbuf_complete to conditionally append slashJeff King1-2/+1
2015-10-05avoid sprintf and strcpy with flex arraysJeff King1-4/+4
2015-09-25resolve_ref: use strbufs for internal buffersJeff King1-27/+30
2015-09-25convert trivial sprintf / strcpy calls to xsnprintfJeff King1-4/+4
2015-09-17ref-filter: add option to filter out tags, branches and remotesKarthik Nayak1-0/+9
2015-09-01refs: make refs/bisect/* per-worktreeDavid Turner1-1/+31
2015-08-25Merge branch 'mh/tempfile'Junio C Hamano1-8/+10
2015-08-25Merge branch 'dt/refs-pseudo'Junio C Hamano1-8/+122
2015-08-19Merge branch 'jk/git-path'Junio C Hamano1-76/+84
2015-08-19Merge branch 'jk/negative-hiderefs'Junio C Hamano1-5/+13
2015-08-11pseudoref: check return values from read_ref()David Turner1-2/+5
2015-08-10refs.c: remove_empty_directories can take a strbufJeff King1-19/+15
2015-08-10refs.c: avoid git_path assignment in lock_ref_sha1_basicJeff King1-13/+19
2015-08-10refs.c: avoid repeated git_path calls in rename_tmp_logJeff King1-7/+14
2015-08-10refs.c: simplify strbufs in reflog setup and writingJeff King1-23/+15
2015-08-10refs.c: remove extra git_path calls from read_loose_refsJeff King1-10/+13
2015-08-10prefer mkpathdup to mkpath in assignmentsJeff King1-2/+4
2015-08-10prefer git_pathdup to git_path in some possibly-dangerous casesJeff King1-6/+8
2015-08-10lockfile: add accessor get_lock_file_path()Michael Haggerty1-3/+3
2015-08-10lockfile: add accessors get_lock_file_fd() and get_lock_file_fp()Michael Haggerty1-5/+7
2015-08-07refs: support negative transfer.hideRefsJeff King1-5/+13
2015-08-03Merge branch 'jk/refspec-parse-wildcard'Junio C Hamano1-19/+25
2015-08-03Merge branch 'dt/refs-backend-preamble'Junio C Hamano1-60/+109
2015-08-03Merge branch 'jk/date-mode-format'Junio C Hamano1-2/+2
2015-08-03Merge branch 'mh/init-delete-refs-api'Junio C Hamano1-13/+169
2015-08-03Merge branch 'mh/replace-refs'Junio C Hamano1-1/+2
2015-07-31pseudorefs: create and use pseudoref update and delete functionsDavid Turner1-8/+93
2015-07-31refs: add ref_type functionDavid Turner1-0/+26
2015-07-27refs: loosen restriction on wildcard "*" refspecsJacob Keller1-16/+20
2015-07-27refs: cleanup comments regarding check_refname_component()Jacob Keller1-5/+7
2015-07-21refs: add REF_FORCE_CREATE_REFLOG flagDavid Turner1-13/+21
2015-07-21refs: new public ref function: safe_create_reflogDavid Turner1-4/+20
2015-07-21refs: break out check for reflog autocreationDavid Turner1-5/+11
2015-07-21refs.c: add err arguments to reflog functionsDavid Turner1-55/+74
2015-06-29convert "enum date_mode" into a structJeff King1-2/+2
2015-06-24Merge branch 'mh/reporting-broken-refs-from-for-each-ref'Junio C Hamano1-7/+22
2015-06-22delete_ref(): use the usual convention for old_sha1Michael Haggerty1-8/+0
2015-06-22refs: move the remaining ref module declarations to refs.hMichael Haggerty1-2/+4
2015-06-22initial_ref_transaction_commit(): check for ref D/F conflictsMichael Haggerty1-0/+34
2015-06-22initial_ref_transaction_commit(): check for duplicate refsMichael Haggerty1-0/+11
2015-06-22refs: remove some functions from the module's public interfaceMichael Haggerty1-7/+24
2015-06-22initial_ref_transaction_commit(): function for initial ref creationMichael Haggerty1-0/+47
2015-06-22repack_without_refs(): make function privateMichael Haggerty1-1/+8
2015-06-22delete_refs(): bail early if the packed-refs file cannot be rewrittenMichael Haggerty1-3/+22
2015-06-22delete_refs(): make error message more genericMichael Haggerty1-1/+1
2015-06-22delete_refs(): new function for the refs APIMichael Haggerty1-0/+19
2015-06-22delete_ref(): handle special case more explicitlyMichael Haggerty1-2/+9
2015-06-22delete_ref(): move declaration to refs.hMichael Haggerty1-2/+3
2015-06-12Allow to control where the replace refs are looked forMike Hommey1-1/+2
2015-06-11Merge branch 'mh/verify-lock-error-report'Junio C Hamano1-14/+26
2015-06-08read_loose_refs(): treat NULL_SHA1 loose references as brokenMichael Haggerty1-0/+10
2015-06-05Merge branch 'mh/write-refs-sooner-2.4' into maintJunio C Hamano1-31/+82
2015-06-03read_loose_refs(): simplify function logicMichael Haggerty1-7/+12
2015-05-27ref_transaction_commit(): do not capitalize error messagesMichael Haggerty1-2/+2
2015-05-27verify_lock(): do not capitalize error messagesMichael Haggerty1-2/+2
2015-05-27verify_lock(): report errors via a strbufMichael Haggerty1-7/+12
2015-05-27verify_lock(): on errors, let the caller unlock the lockMichael Haggerty1-4/+4
2015-05-27verify_lock(): return 0/-1 rather than struct ref_lock *Michael Haggerty1-7/+14
2015-05-25struct ref_lock: convert old_sha1 member to object_idMichael Haggerty1-12/+12
2015-05-25warn_if_dangling_symref(): convert local variable "junk" to object_idMichael Haggerty1-3/+3
2015-05-25each_ref_fn_adapter(): remove adapterMichael Haggerty1-8/+0
2015-05-25each_ref_fn: change to take an object_id parameterMichael Haggerty1-16/+26
2015-05-25refs: convert struct ref_entry to use struct object_idbrian m. carlson1-22/+22
2015-05-22Merge branch 'mh/lockfile-retry'Junio C Hamano1-1/+11
2015-05-22Merge branch 'mh/ref-directory-file'Junio C Hamano1-111/+198
2015-05-22Merge branch 'mh/write-refs-sooner-2.4'Junio C Hamano1-31/+82
2015-05-19Merge branch 'sb/ref-lock-lose-lock-fd'Junio C Hamano1-10/+5
2015-05-14lock_packed_refs(): allow retries when acquiring the packed-refs lockMichael Haggerty1-1/+11
2015-05-12ref_transaction_commit(): fix atomicity and avoid fd exhaustionMichael Haggerty1-21/+53
2015-05-12ref_transaction_commit(): remove the local flags variableMichael Haggerty1-9/+9
2015-05-12ref_transaction_commit(): inline call to write_ref_sha1()Michael Haggerty1-18/+7
2015-05-12rename_ref(): inline calls to write_ref_sha1() from this functionMichael Haggerty1-4/+8
2015-05-12commit_ref_update(): new function, extracted from write_ref_sha1()Michael Haggerty1-7/+20
2015-05-12write_ref_to_lockfile(): new function, extracted from write_ref_sha1()Michael Haggerty1-4/+17
2015-05-11Merge branch 'jk/reading-packed-refs'Junio C Hamano1-2/+4
2015-05-11Merge branch 'nd/multiple-work-trees'Junio C Hamano1-13/+46
2015-05-11reflog_expire(): integrate lock_ref_sha1_basic() errors into oursMichael Haggerty1-2/+2
2015-05-11ref_transaction_commit(): delete extra "the" from error messageMichael Haggerty1-1/+1
2015-05-11ref_transaction_commit(): provide better error messagesMichael Haggerty1-4/+6
2015-05-11rename_ref(): integrate lock_ref_sha1_basic() errors into oursMichael Haggerty1-4/+2
2015-05-11lock_ref_sha1_basic(): improve diagnostics for ref D/F conflictsMichael Haggerty1-4/+12
2015-05-11lock_ref_sha1_basic(): report errors via a "struct strbuf *err"Michael Haggerty1-16/+28
2015-05-11verify_refname_available(): report errors via a "struct strbuf *err"Michael Haggerty1-20/+30
2015-05-11verify_refname_available(): rename functionMichael Haggerty1-17/+20
2015-05-11refs: check for D/F conflicts among refs created in a transactionMichael Haggerty1-62/+94
2015-05-11ref_transaction_commit(): use a string_list for detecting duplicatesMichael Haggerty1-14/+11
2015-05-11is_refname_available(): use dirname in first loopMichael Haggerty1-14/+26
2015-05-11struct nonmatching_ref_data: store a refname instead of a ref_entryMichael Haggerty1-3/+4
2015-05-11report_refname_conflict(): inline functionMichael Haggerty1-8/+2
2015-05-11entry_matches(): inline functionMichael Haggerty1-7/+2
2015-05-11is_refname_available(): convert local variable "dirname" to strbufMichael Haggerty1-7/+5
2015-05-11is_refname_available(): avoid shadowing "dir" variableMichael Haggerty1-2/+2
2015-05-11is_refname_available(): revamp the commentsMichael Haggerty1-22/+47
2015-05-10refs.c: remove lock_fd from struct ref_lockStefan Beller1-10/+5
2015-04-16read_packed_refs: avoid double-checking sane refsJeff King1-2/+4
2015-03-25Merge branch 'jk/prune-with-corrupt-refs'Junio C Hamano1-66/+6
2015-03-20refs.c: drop curate_packed_refsJeff King1-66/+1
2015-03-20refs: introduce a "ref paranoia" flagJeff King1-0/+5
2015-03-10Merge branch 'mh/expire-updateref-fixes'Junio C Hamano1-28/+37
2015-03-05reflog_expire(): never update a reference to null_sha1Michael Haggerty1-2/+5
2015-03-05reflog_expire(): ignore --updateref for symbolic referencesMichael Haggerty1-3/+12
2015-03-05struct ref_lock: delete the force_write memberStefan Beller1-5/+9
2015-03-05lock_ref_sha1_basic(): do not set force_write for missing referencesMichael Haggerty1-9/+6
2015-03-05write_ref_sha1(): move write elision test to callersMichael Haggerty1-9/+9
2015-03-05write_ref_sha1(): remove check for lock == NULLMichael Haggerty1-4/+0
2015-02-24Merge branch 'jk/blame-commit-label' into maintJunio C Hamano1-2/+1
2015-02-17update_ref(): improve documentationMichael Haggerty1-4/+4
2015-02-17ref_transaction_verify(): new function to check a reference's valueMichael Haggerty1-8/+39
2015-02-17ref_transaction_delete(): check that old_sha1 is not null_sha1Michael Haggerty1-0/+2
2015-02-17ref_transaction_create(): check that new_sha1 is validMichael Haggerty1-0/+2
2015-02-17ref_transaction_delete(): remove "have_old" parameterMichael Haggerty1-5/+6
2015-02-17ref_transaction_update(): remove "have_old" parameterMichael Haggerty1-10/+8
2015-02-17struct ref_update: move "have_old" into "flags"Michael Haggerty1-17/+28
2015-02-17refs.c: change some "flags" to "unsigned int"Michael Haggerty1-9/+9
2015-02-12refs: remove the gap in the REF_* constant valuesMichael Haggerty1-1/+2
2015-02-12refs: move REF_DELETING to refs.cMichael Haggerty1-0/+6
2015-02-11Merge branch 'mh/reflog-expire'Junio C Hamano1-82/+181
2015-02-11Merge branch 'jk/blame-commit-label'Junio C Hamano1-2/+1
2015-02-09Merge branch 'mh/reflog-expire' into mh/ref-trans-value-checkJunio C Hamano1-82/+181
2015-01-13use xstrdup_or_null to replace ternary conditionalsJeff King1-2/+1
2014-12-29refs: plug strbuf leak in lock_ref_sha1_basic()René Scharfe1-1/+1
2014-12-22Merge branch 'jk/read-packed-refs-without-path-max'Junio C Hamano1-21/+25
2014-12-22Merge branch 'jk/for-each-reflog-ent-reverse'Junio C Hamano1-12/+37
2014-12-22Merge branch 'mh/simplify-repack-without-refs'Junio C Hamano1-18/+20
2014-12-22refs.c: let fprintf handle the formattingStefan Beller1-5/+2
2014-12-22refs.c: don't expose the internal struct ref_lock in the header fileStefan Beller1-0/+9
2014-12-22lock_any_ref_for_update(): inline functionMichael Haggerty1-8/+1
2014-12-22refs.c: remove unlock_ref/close_ref/commit_ref from the refs apiRonnie Sahlberg1-12/+12
2014-12-22reflog_expire(): new function in the reference APIMichael Haggerty1-0/+129
2014-12-12refs.c: add a function to append a reflog entry to a fdRonnie Sahlberg1-18/+30
2014-12-10read_packed_refs: use skip_prefix instead of static arrayJeff King1-3/+2
2014-12-10read_packed_refs: pass strbuf to parse_ref_lineJeff King1-12/+15
2014-12-10read_packed_refs: use a strbuf for reading linesJeff King1-9/+11
2014-12-05for_each_reflog_ent_reverse: turn leftover check into assertionJeff King1-1/+1
2014-12-05for_each_reflog_ent_reverse: fix newlines on block boundariesJeff King1-11/+36
2014-12-04refs.c: make ref_transaction_delete a wrapper for ref_transaction_updateRonnie Sahlberg1-20/+2
2014-12-04refs.c: make ref_transaction_create a wrapper for ref_transaction_updateRonnie Sahlberg1-25/+2
2014-12-01git_snpath(): retire and replace with strbuf_git_path()Nguyễn Thái Ngọc Duy1-9/+42
2014-12-01path.c: make get_pathname() call sites return const char *Nguyễn Thái Ngọc Duy1-4/+4
2014-11-25repack_without_refs(): make the refnames argument a string_listMichael Haggerty1-18/+20
2014-11-20lock_ref_sha1_basic: do not die on locking errorsRonnie Sahlberg1-2/+8
2014-11-06Merge branch 'jk/fetch-reflog-df-conflict'Junio C Hamano1-2/+2
2014-11-04ignore stale directories when checking reflog existenceJeff King1-2/+2
2014-10-15ref_transaction_commit: bail out on failure to remove a refJonathan Nieder1-2/+6
2014-10-15refs.c: do not permit err == NULLJonathan Nieder1-19/+27
2014-10-15refs.c: allow listing and deleting badly named refsRonnie Sahlberg1-29/+119
2014-10-15packed-ref cache: forbid dot-components in refnamesJonathan Nieder1-11/+3
2014-10-15branch -d: avoid repeated symref resolutionJonathan Nieder1-2/+15
2014-10-15refs.c: change resolve_ref_unsafe reading argument to be a flags fieldRonnie Sahlberg1-40/+53
2014-10-15refs.c: make write_ref_sha1 staticRonnie Sahlberg1-2/+8
2014-10-15refs.c: ref_transaction_commit: distinguish name conflicts from other errorsRonnie Sahlberg1-10/+16
2014-10-15refs.c: pass a list of names to skip to is_refname_availableRonnie Sahlberg1-18/+32
2014-10-15refs.c: call lock_ref_sha1_basic directly from commitRonnie Sahlberg1-6/+6
2014-10-15refs.c: refuse to lock badly named refs in lock_ref_sha1_basicRonnie Sahlberg1-2/+5
2014-10-15rename_ref: don't ask read_ref_full where the ref came fromRonnie Sahlberg1-1/+1
2014-10-15refs.c: pass the ref log message to _create/delete/update instead of _commitRonnie Sahlberg1-13/+21
2014-10-15refs.c: add an err argument to delete_ref_looseRonnie Sahlberg1-4/+5
2014-10-15refs.c: lock_ref_sha1_basic is used for all refsRonnie Sahlberg1-1/+1
2014-10-15wrapper.c: remove/unlink_or_warn: simplify, treat ENOENT as successRonnie Sahlberg1-1/+1
2014-10-01commit_packed_refs(): reimplement using fdopen_lock_file()Michael Haggerty1-4/+1
2014-10-01lockfile.h: extract new header file for the functions in lockfile.cMichael Haggerty1-0/+1
2014-10-01get_locked_file_path(): new functionMichael Haggerty1-3/+1
2014-10-01lockfile: rename LOCK_NODEREF to LOCK_NO_DEREFMichael Haggerty1-1/+1
2014-10-01lockfile: change lock_file::filename into a strbufMichael Haggerty1-3/+3
2014-10-01delete_ref_loose(): don't muck around in the lock_file's filenameMichael Haggerty1-6/+9
2014-10-01cache.h: define constants LOCK_SUFFIX and LOCK_SUFFIX_LENMichael Haggerty1-3/+4
2014-10-01unable_to_lock_die(): rename function from unable_to_lock_index_die()Michael Haggerty1-1/+1
2014-09-29Merge branch 'da/rev-parse-verify-quiet'Junio C Hamano1-3/+7
2014-09-26Merge branch 'jk/faster-name-conflicts'Junio C Hamano1-32/+90
2014-09-26Merge branch 'jk/write-packed-refs-via-stdio'Junio C Hamano1-23/+16