Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-10-26 03:11:39 +0300
committerJunio C Hamano <gitster@pobox.com>2022-10-26 03:11:39 +0300
commit28f9cd0d5fa0dd448c6424630e243ec4862b9dde (patch)
treea7c70f9b8bb3538b65a5b4735fef83b6e0e5cb18 /builtin
parentb30a4435ed0e96212f6023cb7a952b95a58de818 (diff)
parentb004c9028270832aec73746fdddd5c7bce8dbe84 (diff)
Merge branch 'rs/gc-pack-refs-simplify' into maint-2.38
Code clean-up. * rs/gc-pack-refs-simplify: gc: simplify maintenance_task_pack_refs()
Diffstat (limited to 'builtin')
-rw-r--r--builtin/gc.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/builtin/gc.c b/builtin/gc.c
index 2753bd15a5..ceff31ea00 100644
--- a/builtin/gc.c
+++ b/builtin/gc.c
@@ -167,16 +167,9 @@ static void gc_config(void)
struct maintenance_run_opts;
static int maintenance_task_pack_refs(MAYBE_UNUSED struct maintenance_run_opts *opts)
{
- struct strvec pack_refs_cmd = STRVEC_INIT;
- int ret;
+ const char *argv[] = { "pack-refs", "--all", "--prune", NULL };
- strvec_pushl(&pack_refs_cmd, "pack-refs", "--all", "--prune", NULL);
-
- ret = run_command_v_opt(pack_refs_cmd.v, RUN_GIT_CMD);
-
- strvec_clear(&pack_refs_cmd);
-
- return ret;
+ return run_command_v_opt(argv, RUN_GIT_CMD);
}
static int too_many_loose_objects(void)