summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-05-13 19:19:18 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-05-13 19:19:18 (GMT)
commit896833b2687ce09a4965e5b4f3992daad096a65b (patch)
tree5edc5ea6874a06b4f78856339b3fab204dcaaa96 /builtin
parentb994622632154fc3b17fb40a38819ad954a5fb88 (diff)
parentcac4b8e22ee39e52341d718450f8e4055c4dc16f (diff)
downloadgit-896833b2687ce09a4965e5b4f3992daad096a65b.zip
git-896833b2687ce09a4965e5b4f3992daad096a65b.tar.gz
git-896833b2687ce09a4965e5b4f3992daad096a65b.tar.bz2
Merge branch 'tb/shallow-cleanup'
Code cleanup. * tb/shallow-cleanup: shallow: use struct 'shallow_lock' for additional safety shallow.h: document '{commit,rollback}_shallow_file' shallow: extract a header file for shallow-related functions commit: make 'commit_graft_pos' non-static
Diffstat (limited to 'builtin')
-rw-r--r--builtin/fetch.c1
-rw-r--r--builtin/pack-objects.c1
-rw-r--r--builtin/prune.c1
-rw-r--r--builtin/receive-pack.c3
-rw-r--r--builtin/repack.c1
-rw-r--r--builtin/rev-parse.c1
6 files changed, 7 insertions, 1 deletions
diff --git a/builtin/fetch.c b/builtin/fetch.c
index 3ae52c0..95beed5 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -27,6 +27,7 @@
#include "branch.h"
#include "promisor-remote.h"
#include "commit-graph.h"
+#include "shallow.h"
#define FORCED_UPDATES_DELAY_WARNING_IN_MS (10 * 1000)
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index 03b85f5..c5b433a 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -34,6 +34,7 @@
#include "dir.h"
#include "midx.h"
#include "trace2.h"
+#include "shallow.h"
#define IN_PACK(obj) oe_in_pack(&to_pack, obj)
#define SIZE(obj) oe_size(&to_pack, obj)
diff --git a/builtin/prune.c b/builtin/prune.c
index fd9acc7..02c6ab7 100644
--- a/builtin/prune.c
+++ b/builtin/prune.c
@@ -8,6 +8,7 @@
#include "progress.h"
#include "prune-packed.h"
#include "object-store.h"
+#include "shallow.h"
static const char * const prune_usage[] = {
N_("git prune [-n] [-v] [--progress] [--expire <time>] [--] [<head>...]"),
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index d37ab77..ea3d0f0 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -28,6 +28,7 @@
#include "protocol.h"
#include "commit-reach.h"
#include "worktree.h"
+#include "shallow.h"
static const char * const receive_pack_usage[] = {
N_("git receive-pack <git-dir>"),
@@ -876,7 +877,7 @@ static void refuse_unconfigured_deny_delete_current(void)
static int command_singleton_iterator(void *cb_data, struct object_id *oid);
static int update_shallow_ref(struct command *cmd, struct shallow_info *si)
{
- struct lock_file shallow_lock = LOCK_INIT;
+ struct shallow_lock shallow_lock = SHALLOW_LOCK_INIT;
struct oid_array extra = OID_ARRAY_INIT;
struct check_connected_options opt = CHECK_CONNECTED_INIT;
uint32_t mask = 1 << (cmd->index % 32);
diff --git a/builtin/repack.c b/builtin/repack.c
index 1b686ee..df28773 100644
--- a/builtin/repack.c
+++ b/builtin/repack.c
@@ -13,6 +13,7 @@
#include "prune-packed.h"
#include "object-store.h"
#include "promisor-remote.h"
+#include "shallow.h"
static int delta_base_offset = 1;
static int pack_kept_objects = -1;
diff --git a/builtin/rev-parse.c b/builtin/rev-parse.c
index 0605643..669dd2f 100644
--- a/builtin/rev-parse.c
+++ b/builtin/rev-parse.c
@@ -16,6 +16,7 @@
#include "split-index.h"
#include "submodule.h"
#include "commit-reach.h"
+#include "shallow.h"
#define DO_REVS 1
#define DO_NOREV 2