aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/gc.c
AgeCommit message (Expand)AuthorFilesLines
12 daysMerge branch 'kn/maintenance-is-needed'Junio C Hamano1-10/+83
14 daysMerge branch 'ps/ref-peeled-tags'Junio C Hamano1-9/+6
2025-11-10maintenance: add 'is-needed' subcommandKarthik Nayak1-1/+62
2025-11-10maintenance: add checking logic in `pack_refs_condition()`Karthik Nayak1-9/+21
2025-11-04Merge branch 'ps/ref-peeled-tags' into kn/maintenance-is-neededJunio C Hamano1-9/+6
2025-11-04refs: expose peeled object ID via the iteratorPatrick Steinhardt1-1/+1
2025-11-04refs: introduce wrapper struct for `each_ref_fn`Patrick Steinhardt1-9/+6
2025-11-03Merge branch 'ps/maintenance-geometric'Junio C Hamano1-55/+258
2025-10-24builtin/maintenance: introduce "geometric" strategyPatrick Steinhardt1-0/+31
2025-10-24builtin/maintenance: make "gc" strategy accessiblePatrick Steinhardt1-3/+6
2025-10-24builtin/maintenance: extend "maintenance.strategy" to manual maintenancePatrick Steinhardt1-5/+20
2025-10-24builtin/maintenance: run maintenance tasks depending on typePatrick Steinhardt1-9/+19
2025-10-24builtin/maintenance: improve readability of strategiesPatrick Steinhardt1-11/+25
2025-10-24builtin/maintenance: don't silently ignore invalid strategyPatrick Steinhardt1-6/+11
2025-10-24builtin/maintenance: make the geometric factor configurablePatrick Steinhardt1-1/+8
2025-10-24builtin/maintenance: introduce "geometric-repack" taskPatrick Steinhardt1-0/+102
2025-10-24builtin/gc: make `too_many_loose_objects()` reusable without GC configPatrick Steinhardt1-4/+4
2025-10-24builtin/gc: remove global `repack` variablePatrick Steinhardt1-29/+45
2025-10-16packfile: introduce macro to iterate through packsPatrick Steinhardt1-9/+7
2025-10-16builtin/gc: convert to use `packfile_store_get_all_packs()`Patrick Steinhardt1-1/+1
2025-09-24packfile: refactor `get_all_packs()` to work on packfile storePatrick Steinhardt1-3/+5
2025-09-24packfile: refactor `get_packed_git()` to work on packfile storePatrick Steinhardt1-1/+1
2025-09-24packfile: split up responsibilities of `reprepare_packed_git()`Patrick Steinhardt1-2/+2
2025-08-21Merge branch 'ps/remote-rename-fix'Junio C Hamano1-1/+2
2025-08-06refs: pass refname when invoking reflog entry callbackPatrick Steinhardt1-1/+2
2025-08-05Merge branch 'ps/object-file-wo-the-repository'Junio C Hamano1-6/+4
2025-08-04Merge branch 'ps/config-wo-the-repository'Junio C Hamano1-35/+35
2025-08-01Merge branch 'jk/unleak-reflog-expire-entry'Junio C Hamano1-0/+1
2025-07-23config: drop `git_config_set_multivar_in_file_gently()` wrapperPatrick Steinhardt1-2/+2
2025-07-23config: drop `git_config_set()` wrapperPatrick Steinhardt1-2/+2
2025-07-23config: drop `git_config_get_bool()` wrapperPatrick Steinhardt1-3/+3
2025-07-23config: drop `git_config_get_ulong()` wrapperPatrick Steinhardt1-5/+5
2025-07-23config: drop `git_config_get_int()` wrapperPatrick Steinhardt1-13/+13
2025-07-23config: drop `git_config_get_string()` wrapperPatrick Steinhardt1-2/+2
2025-07-23config: drop `git_config_get_string()` wrapperPatrick Steinhardt1-2/+2
2025-07-23config: drop `git_config_get_string_multi()` wrapperPatrick Steinhardt1-2/+2
2025-07-23config: drop `git_config_get_value()` wrapperPatrick Steinhardt1-2/+2
2025-07-23config: drop `git_config_get()` wrapperPatrick Steinhardt1-1/+1
2025-07-23config: drop `git_config()` wrapperPatrick Steinhardt1-1/+1
2025-07-22reflog: close leak of reflog expire entryJacob Keller1-0/+1
2025-07-16object-file: get rid of `the_repository` in loose object iteratorsPatrick Steinhardt1-6/+4
2025-07-15Merge branch 'ps/object-store'Junio C Hamano1-8/+8
2025-07-14Merge branch 'ac/prune-wo-the-repository'Junio C Hamano1-1/+1
2025-07-14Merge branch 'cb/total-ram-bsd-fix'Junio C Hamano1-3/+10
2025-07-09Merge branch 'ps/object-store' into ps/object-file-wo-the-repositoryJunio C Hamano1-8/+8
2025-07-07builtin/gc: correct total_ram calculation with HAVE_BSD_SYSCTLCarlo Marcelo Arenas Belón1-3/+10
2025-07-07repository: move 'repository_format_precious_objects' to repo scopeAyush Chandekar1-1/+1
2025-07-01odb: rename `oid_object_info()`Patrick Steinhardt1-1/+1
2025-07-01object-store: rename `object_directory` to `odb_source`Patrick Steinhardt1-7/+7
2025-06-25Merge branch 'ps/maintenance-ref-lock'Junio C Hamano1-172/+238
2025-06-03builtin/maintenance: fix locking race when handling "gc" taskPatrick Steinhardt1-14/+27
2025-06-03builtin/gc: avoid global state in `gc_before_repack()`Patrick Steinhardt1-15/+9
2025-06-03builtin/maintenance: fix locking race with refs and reflogs tasksPatrick Steinhardt1-2/+2
2025-06-03builtin/maintenance: split into foreground and background tasksPatrick Steinhardt1-21/+49
2025-06-03builtin/maintenance: fix typedef for function pointersPatrick Steinhardt1-5/+5
2025-06-03builtin/maintenance: extract function to run tasksPatrick Steinhardt1-12/+23
2025-06-03builtin/maintenance: stop modifying global array of tasksPatrick Steinhardt1-94/+112
2025-06-03builtin/maintenance: mark "--task=" and "--schedule=" as incompatiblePatrick Steinhardt1-2/+4
2025-06-03builtin/maintenance: centralize configuration of explicit tasksPatrick Steinhardt1-23/+24
2025-06-03builtin/gc: drop redundant local variablePatrick Steinhardt1-6/+5
2025-06-03builtin/gc: use designated field initializers for maintenance tasksPatrick Steinhardt1-27/+27
2025-06-01builtin/gc: correct physical memory detection for OpenBSD / NetBSDBrad Smith1-1/+3
2025-05-15Merge branch 'ps/maintenance-missing-tasks'Junio C Hamano1-31/+117
2025-05-12Merge branch 'ps/object-store-cleanup'Junio C Hamano1-1/+1
2025-05-07builtin/maintenance: introduce "rerere-gc" taskPatrick Steinhardt1-0/+37
2025-05-07builtin/gc: move rerere garbage collection into separate functionPatrick Steinhardt1-5/+11
2025-05-07builtin/maintenance: introduce "worktree-prune" taskPatrick Steinhardt1-0/+45
2025-05-07builtin/gc: move pruning of worktrees into a separate functionPatrick Steinhardt1-10/+15
2025-05-07builtin/gc: remove global variables where it is trivial to doPatrick Steinhardt1-19/+12
2025-05-07builtin/gc: fix indentation of `cmd_gc()` parametersPatrick Steinhardt1-3/+3
2025-04-29Merge branch 'jh/gc-launchctl-schedule-fix'Junio C Hamano1-2/+2
2025-04-29object-store: move function declarations to their respective subsystemsPatrick Steinhardt1-1/+1
2025-04-24Merge branch 'rj/build-tweaks'Junio C Hamano1-2/+7
2025-04-24Merge branch 'ps/parse-options-integers'Junio C Hamano1-5/+11
2025-04-24Merge branch 'ps/object-file-cleanup'Junio C Hamano1-5/+4
2025-04-24Merge branch 'ps/object-file-cleanup' into ps/object-store-cleanupJunio C Hamano1-5/+4
2025-04-23maintenance: fix launchctl calendar intervalsJosh Heinrichs1-2/+2
2025-04-17parse-options: rename `OPT_MAGNITUDE()` to `OPT_UNSIGNED()`Patrick Steinhardt1-2/+2
2025-04-17global: use designated initializers for optionsPatrick Steinhardt1-3/+9
2025-04-16builtin/gc.c: correct RAM calculation when using sysinfoRamsay Jones1-2/+7
2025-04-16Merge branch 'ps/maintenance-reflog-expire'Junio C Hamano1-11/+61
2025-04-15object-store: merge "object-store-ll.h" and "object-store.h"Patrick Steinhardt1-1/+1
2025-04-15object-file: move `safe_create_leading_directories()` into "path.c"Patrick Steinhardt1-4/+3
2025-04-08builtin/maintenance: introduce "reflog-expire" taskPatrick Steinhardt1-0/+50
2025-04-08builtin/gc: split out function to expire reflog entriesPatrick Steinhardt1-11/+11
2025-03-23maintenance: add loose-objects.batchSize configDerrick Stolee1-0/+10
2025-03-23maintenance: force progress/no-quiet to childrenDerrick Stolee1-0/+10
2025-03-05Merge branch 'ps/path-sans-the-repository'Junio C Hamano1-8/+17
2025-02-28path: drop `git_path()` in favor of `repo_git_path()`Patrick Steinhardt1-6/+15
2025-02-12Merge branch 'zh/gc-expire-to'Junio C Hamano1-2/+7
2025-02-07path: drop `git_pathdup()` in favor of `repo_git_path()`Patrick Steinhardt1-2/+2
2025-01-28Merge branch 'jc/show-usage-help'Junio C Hamano1-2/+2
2025-01-24gc: add `--expire-to` optionZheNing Hu1-2/+7
2025-01-17builtins: send usage_with_options() help text to standard outputJunio C Hamano1-2/+2
2025-01-07wrapper: allow generating insecure random bytesPatrick Steinhardt1-1/+1
2024-12-23Merge branch 'ps/build-sign-compare'Junio C Hamano1-0/+3
2024-12-13Merge branch 'kn/midx-wo-the-repository'Junio C Hamano1-1/+11
2024-12-06global: mark code units that generate warnings with `-Wsign-compare`Patrick Steinhardt1-0/+3
2024-12-04Merge branch 'kn/pass-repo-to-builtin-sub-sub-commands' into kn/midx-wo-the-r...Junio C Hamano1-8/+13
2024-12-04Merge branch 'kn/pass-repo-to-builtin-sub-sub-commands'Junio C Hamano1-8/+13
2024-12-04Merge branch 'ps/gc-stale-lock-warning'Junio C Hamano1-1/+10
2024-12-04config: make `delta_base_cache_limit` a non-global variableKarthik Nayak1-1/+11
2024-11-26builtin: pass repository to sub commandsKarthik Nayak1-8/+13
2024-11-20Merge branch 'ps/maintenance-start-crash-fix' into maint-2.47Junio C Hamano1-2/+5
2024-11-20builtin/gc: provide hint when maintenance hits a stale schedule lockPatrick Steinhardt1-1/+10
2024-10-18Merge branch 'ps/maintenance-start-crash-fix'Taylor Blau1-2/+5
2024-10-10builtin/gc: fix crash when running `git maintenance start`Patrick Steinhardt1-2/+5
2024-10-02Merge branch 'ps/leakfixes-part-7'Junio C Hamano1-49/+82
2024-09-30Merge branch 'ds/background-maintenance-with-credential'Junio C Hamano1-7/+46
2024-09-27builtin/maintenance: fix leak in `get_schedule_cmd()`Patrick Steinhardt1-47/+80
2024-09-27builtin/maintenance: fix leaking config stringPatrick Steinhardt1-2/+2
2024-09-23Merge branch 'jc/pass-repo-to-builtins'Junio C Hamano1-4/+9
2024-09-23Merge branch 'ps/environ-wo-the-repository'Junio C Hamano1-1/+1
2024-09-20maintenance: add custom config to background jobsDerrick Stolee1-7/+46
2024-09-13builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.hJohn Cai1-2/+1
2024-09-13builtin: add a repository parameter for builtin functionsJohn Cai1-2/+8
2024-09-12environment: make `get_git_common_dir()` accept a repositoryPatrick Steinhardt1-1/+1
2024-09-06Merge branch 'jk/maybe-unused-cleanup'Junio C Hamano1-1/+1
2024-08-29gc: drop MAYBE_UNUSED annotation from used parameterJeff King1-1/+1
2024-08-28gc: mark unused config parameter in virtual functionsJeff King1-8/+8
2024-08-26Merge branch 'ps/maintenance-detach-fix-more'Junio C Hamano1-1/+10
2024-08-26Merge branch 'ps/maintenance-detach-fix'Junio C Hamano1-146/+238
2024-08-23Merge branch 'ps/config-wo-the-repository'Junio C Hamano1-4/+4
2024-08-21builtin/maintenance: fix loose objects task emitting pack hashPatrick Steinhardt1-0/+6
2024-08-21t7900: exercise detaching via trace2 regionsPatrick Steinhardt1-1/+4
2024-08-16run-command: fix detaching when running auto maintenancePatrick Steinhardt1-0/+1
2024-08-16builtin/maintenance: add a `--detach` flagPatrick Steinhardt1-0/+6
2024-08-16builtin/gc: add a `--detach` flagPatrick Steinhardt1-31/+39
2024-08-16builtin/gc: stop processing log file on signalPatrick Steinhardt1-8/+0
2024-08-16builtin/gc: fix leaking config valuesPatrick Steinhardt1-27/+81
2024-08-16builtin/gc: refactor to read config into structurePatrick Steinhardt1-112/+143
2024-08-16config: fix constness of out parameter for `git_config_get_expiry()`Patrick Steinhardt1-3/+3
2024-08-13config: pass repo to `git_config_get_expiry()`Patrick Steinhardt1-3/+3
2024-08-13hooks: remove implicit dependency on `the_repository`Patrick Steinhardt1-1/+1
2024-08-09refs: add referent to each_ref_fnJohn Cai1-0/+1
2024-05-17refs: pass repo when peeling objectsPatrick Steinhardt1-1/+1
2024-05-07cocci: apply rules to rewrite callers of "refs" interfacesPatrick Steinhardt1-1/+2
2024-04-30Merge branch 'js/for-each-repo-keep-going'Junio C Hamano1-3/+4
2024-04-24maintenance: running maintenance should not stop on errorsJohannes Schindelin1-3/+4
2024-04-09Merge branch 'ps/pack-refs-auto'Junio C Hamano1-37/+49
2024-03-25builtin/gc: pack refs when using `git maintenance run --auto`Patrick Steinhardt1-1/+11
2024-03-25builtin/gc: forward git-gc(1)'s `--auto` flag when packing refsPatrick Steinhardt1-9/+12
2024-03-25builtin/gc: move `struct maintenance_run_opts`Patrick Steinhardt1-27/+26
2024-03-15config: add --comment option to add a commentRalph Seichter1-2/+2
2024-01-18maintenance: use XDG config if it existsKristoffer Haugsbakk1-14/+13
2024-01-18config: rename global config functionKristoffer Haugsbakk1-2/+2
2023-10-18Merge branch 'tb/repack-max-cruft-size'Junio C Hamano1-0/+7
2023-10-05builtin/repack.c: implement support for `--max-cruft-size`Taylor Blau1-0/+7
2023-10-02gc: add `gc.repackFilterTo` config optionChristian Couder1-0/+4
2023-10-02gc: add `gc.repackFilter` config optionChristian Couder1-0/+6
2023-09-20Merge branch 'js/systemd-timers-wsl-fix'Junio C Hamano1-1/+1
2023-09-13Merge branch 'jk/unused-post-2.42-part2'Junio C Hamano1-1/+1
2023-09-11maintenance(systemd): support the Windows Subsystem for LinuxJohannes Schindelin1-1/+1
2023-09-05parse-options: mark unused "opt" parameter in callbacksJeff King1-1/+1
2023-08-29gc: mark unused descriptors in scheduler callbacksJeff King1-3/+3
2023-08-24Merge branch 'ds/maintenance-schedule-fuzz'Junio C Hamano1-83/+208
2023-08-15Merge branch 'ds/maintenance-on-windows-fix'Junio C Hamano1-1/+1
2023-08-10maintenance: update schedule before configDerrick Stolee1-1/+4
2023-08-10maintenance: fix systemd schedule overlapsDerrick Stolee1-2/+2
2023-08-10maintenance: use random minute in systemd schedulerDerrick Stolee1-23/+129
2023-08-10maintenance: swap method locationsDerrick Stolee1-48/+48
2023-08-10maintenance: use random minute in cron schedulerDerrick Stolee1-4/+5
2023-08-10maintenance: use random minute in Windows schedulerDerrick Stolee1-6/+10
2023-08-10maintenance: use random minute in launchctl schedulerDerrick Stolee1-11/+12
2023-08-10maintenance: add get_random_minute()Derrick Stolee1-0/+10
2023-08-09git maintenance: avoid console window in scheduled tasks on WindowsJohannes Schindelin1-1/+1
2023-07-05treewide: remove unnecessary includes for wrapper.hCalvin Wan1-1/+0
2023-06-21object-store-ll.h: split this header out of object-store.hElijah Newren1-1/+1
2023-06-21repository: remove unnecessary include of path.hElijah Newren1-0/+1
2023-05-09Merge branch 'en/header-split-cache-h-part-2'Junio C Hamano1-0/+1
2023-05-02Merge branch 'tb/ban-strtok'Junio C Hamano1-2/+2
2023-04-28Merge branch 'tb/enable-cruft-packs-by-default'Junio C Hamano1-6/+2
2023-04-25Merge branch 'en/header-split-cache-h'Junio C Hamano1-0/+2
2023-04-24string-list: multi-delimiter `string_list_split_in_place()`Taylor Blau1-2/+2
2023-04-24commit.h: reduce unnecessary includesElijah Newren1-0/+1
2023-04-18builtin/gc.c: make `gc.cruftPacks` enabled by defaultTaylor Blau1-5/+1
2023-04-18builtin/gc.c: ignore cruft packs with `--keep-largest-pack`Taylor Blau1-1/+1
2023-04-11object-file.h: move declarations for object-file.c functions from cache.hElijah Newren1-0/+1
2023-04-11treewide: be explicit about dependence on trace.h & trace2.hElijah Newren1-0/+1
2023-04-06Merge branch 'en/header-split-cleanup'Junio C Hamano1-0/+5
2023-04-06Merge branch 'ab/remove-implicit-use-of-the-repository'Junio C Hamano1-4/+4
2023-04-06Merge branch 'ab/config-multi-and-nonbool'Junio C Hamano1-10/+5
2023-04-04Merge branch 'ab/remove-implicit-use-of-the-repository' into en/header-split-...Junio C Hamano1-4/+4
2023-03-28config API: add "string" version of *_value_multi(), fix segfaultsÆvar Arnfjörð Bjarmason1-3/+3
2023-03-28config API: have *_multi() return an "int" and take a "dest"Ævar Arnfjörð Bjarmason1-6/+4
2023-03-28config API: add and use a "git_config_get()" family of functionsÆvar Arnfjörð Bjarmason1-4/+1
2023-03-28cocci: apply the "promisor-remote.h" part of "the_repository.pending"Ævar Arnfjörð Bjarmason1-1/+1
2023-03-28cocci: apply the "packfile.h" part of "the_repository.pending"Ævar Arnfjörð Bjarmason1-1/+1
2023-03-28cocci: apply the "commit.h" part of "the_repository.pending"Ævar Arnfjörð Bjarmason1-2/+2
2023-03-21setup.h: move declarations for setup.c functions from cache.hElijah Newren1-0/+1
2023-03-21environment.h: move declarations for environment.c functions from cache.hElijah Newren1-0/+1
2023-03-21wrapper.h: move declarations for wrapper.c functions from cache.hElijah Newren1-0/+1
2023-03-21abspath.h: move absolute path functions from cache.hElijah Newren1-0/+1
2023-03-21treewide: be explicit about dependence on gettext.hElijah Newren1-0/+1
2023-03-17Merge branch 'jk/unused-post-2.39-part2'Junio C Hamano1-7/+7
2023-02-24for_each_object: mark unused callback parametersJeff King1-7/+7
2023-02-23cache.h: remove dependence on hex.h; make other files include it explicitlyElijah Newren1-0/+1
2022-11-23Merge branch 'rp/maintenance-qol'Junio C Hamano1-13/+32
2022-11-15builtin/gc.c: fix use-after-free in maintenance_unregister()Taylor Blau1-3/+2
2022-11-15maintenance --unregister: fix uninit'd data use & -Wdeclaration-after-statementÆvar Arnfjörð Bjarmason1-2/+3