summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-01-27 03:42:09 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-01-27 03:42:09 (GMT)
commit012a1bb524245d119ee561c6c8d269ad021f489a (patch)
treed901026a711a3944ed34b08741fae2a16bfbecc0 /builtin
parent5d417842efeafb6e109db7574196901c4e95d273 (diff)
parentb495697b8228fdf7cde426ff99fc5ffe7e43d343 (diff)
downloadgit-012a1bb524245d119ee561c6c8d269ad021f489a.zip
git-012a1bb524245d119ee561c6c8d269ad021f489a.tar.gz
git-012a1bb524245d119ee561c6c8d269ad021f489a.tar.bz2
Merge branch 'jk/maint-gc-auto-after-fetch' into jk/gc-auto-after-fetch
* jk/maint-gc-auto-after-fetch: fetch-pack: avoid repeatedly re-scanning pack directory fetch: run gc --auto after fetching
Diffstat (limited to 'builtin')
-rw-r--r--builtin/fetch.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/builtin/fetch.c b/builtin/fetch.c
index 4b5a898..1ddbf0d 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -959,6 +959,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");
@@ -1026,5 +1029,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;
}