summaryrefslogtreecommitdiff
path: root/builtin/fetch.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-02-01 20:40:16 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-02-01 20:40:16 (GMT)
commit4acfff9dda29ae700c8b053cf7af9d4bcdf73762 (patch)
treee3af4cc1640f1594c5cda9e3bbb9718952e0a3b7 /builtin/fetch.c
parent97fbc23ad7bf13e4f4b74c6f9f98aaa65bd2117a (diff)
parent012a1bb524245d119ee561c6c8d269ad021f489a (diff)
downloadgit-4acfff9dda29ae700c8b053cf7af9d4bcdf73762.zip
git-4acfff9dda29ae700c8b053cf7af9d4bcdf73762.tar.gz
git-4acfff9dda29ae700c8b053cf7af9d4bcdf73762.tar.bz2
Merge branch 'jk/gc-auto-after-fetch'
Help "fetch only" repositories that do not trigger "gc --auto" often enough. * jk/gc-auto-after-fetch: fetch-pack: avoid repeatedly re-scanning pack directory fetch: run gc --auto after fetching
Diffstat (limited to 'builtin/fetch.c')
-rw-r--r--builtin/fetch.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/builtin/fetch.c b/builtin/fetch.c
index 3b97fc9..4b6b1df 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -962,6 +962,9 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
struct string_list list = STRING_LIST_INIT_NODUP;
struct remote *remote;
int result = 0;
+ static const char *argv_gc_auto[] = {
+ "gc", "--auto", NULL,
+ };
packet_trace_identity("fetch");
@@ -1041,5 +1044,7 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
list.strdup_strings = 1;
string_list_clear(&list, 0);
+ run_command_v_opt(argv_gc_auto, RUN_GIT_CMD);
+
return result;
}