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>2020-12-24 00:59:46 +0300
committerJunio C Hamano <gitster@pobox.com>2020-12-24 00:59:46 +0300
commit7a5026529529e811b41de02ca12aa6c8ff3d11c5 (patch)
treec21a12770bad4b904073dab1a93c152e609d95e2 /builtin
parent04cd9996383791cde0e866eb96e516f7646227c3 (diff)
parenta52df25a546e33e76c3ddeff66545e4437249290 (diff)
Merge branch 'ma/maintenance-crontab-fix'
Hotfix for a topic of this cycle. * ma/maintenance-crontab-fix: t7900-maintenance: test for magic markers gc: fix handling of crontab magic markers git-maintenance.txt: add missing word
Diffstat (limited to 'builtin')
-rw-r--r--builtin/gc.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/builtin/gc.c b/builtin/gc.c
index b57fda4924..4c24f41852 100644
--- a/builtin/gc.c
+++ b/builtin/gc.c
@@ -1554,11 +1554,10 @@ static int update_background_schedule(int run_maintenance)
while (!strbuf_getline_lf(&line, cron_list)) {
if (!in_old_region && !strcmp(line.buf, BEGIN_LINE))
in_old_region = 1;
- if (in_old_region)
- continue;
- fprintf(cron_in, "%s\n", line.buf);
- if (in_old_region && !strcmp(line.buf, END_LINE))
+ else if (in_old_region && !strcmp(line.buf, END_LINE))
in_old_region = 0;
+ else if (!in_old_region)
+ fprintf(cron_in, "%s\n", line.buf);
}
if (run_maintenance) {