summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-06-05 00:18:11 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-06-05 00:18:11 (GMT)
commit711a11c301dafe84389624f009a2abfb7da5d83f (patch)
tree9a0b0317a7516cb09b3cc2cb7f14b1ca31f674ed /builtin
parent53083f8547cd45cdfabcf2f1bd21461cd6769189 (diff)
parentf23092f19e73f5d8c3480ef02104af627a90361f (diff)
downloadgit-711a11c301dafe84389624f009a2abfb7da5d83f.zip
git-711a11c301dafe84389624f009a2abfb7da5d83f.tar.gz
git-711a11c301dafe84389624f009a2abfb7da5d83f.tar.bz2
Merge branch 'mh/packed-ref-store-prep'
The implementation of "ref" API around the "packed refs" have been cleaned up, in preparation for further changes. * mh/packed-ref-store-prep: (25 commits) cache_ref_iterator_begin(): avoid priming unneeded directories ref-filter: limit traversal to prefix create_ref_entry(): remove `check_name` option refs_ref_iterator_begin(): handle `GIT_REF_PARANOIA` read_packed_refs(): report unexpected fopen() failures read_packed_refs(): do more of the work of reading packed refs get_packed_ref_cache(): assume "packed-refs" won't change while locked should_pack_ref(): new function, extracted from `files_pack_refs()` ref_update_reject_duplicates(): add a sanity check ref_update_reject_duplicates(): use `size_t` rather than `int` ref_update_reject_duplicates(): expose function to whole refs module ref_transaction_prepare(): new optional step for reference updates ref_transaction_commit(): check for valid `transaction->state` files_transaction_cleanup(): new helper function files_ref_store: put the packed files lock directly in this struct files-backend: move `lock` member to `files_ref_store` lockfile: add a new method, is_lock_file_locked() ref_store: take a `msg` parameter when deleting references refs: use `size_t` indexes when iterating over ref transaction updates refs_ref_iterator_begin(): don't check prefixes redundantly ...
Diffstat (limited to 'builtin')
-rw-r--r--builtin/fetch.c2
-rw-r--r--builtin/remote.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/builtin/fetch.c b/builtin/fetch.c
index d4d573b..4770845 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -941,7 +941,7 @@ static int prune_refs(struct refspec *refs, int ref_count, struct ref *ref_map,
for (ref = stale_refs; ref; ref = ref->next)
string_list_append(&refnames, ref->name);
- result = delete_refs(&refnames, 0);
+ result = delete_refs("fetch: prune", &refnames, 0);
string_list_clear(&refnames, 0);
}
diff --git a/builtin/remote.c b/builtin/remote.c
index 9054e28..f1a88fe 100644
--- a/builtin/remote.c
+++ b/builtin/remote.c
@@ -786,7 +786,7 @@ static int rm(int argc, const char **argv)
strbuf_release(&buf);
if (!result)
- result = delete_refs(&branches, REF_NODEREF);
+ result = delete_refs("remote: remove", &branches, REF_NODEREF);
string_list_clear(&branches, 0);
if (skipped.nr) {
@@ -1304,7 +1304,7 @@ static int prune_remote(const char *remote, int dry_run)
string_list_sort(&refs_to_prune);
if (!dry_run)
- result |= delete_refs(&refs_to_prune, 0);
+ result |= delete_refs("remote: prune", &refs_to_prune, 0);
for_each_string_list_item(item, &states.stale) {
const char *refname = item->util;