All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] gc: fix handling of crontab magic markers
@ 2020-12-21 21:26 Martin Ågren
  2020-12-21 21:26 ` [PATCH 1/3] git-maintenance.txt: add missing word Martin Ågren
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Martin Ågren @ 2020-12-21 21:26 UTC (permalink / raw)
  To: git; +Cc: Derrick Stolee

This is a fix for a new bug in the v2.30 cycle:

`git maintenance [start|stop]` add and/or remove entries to/from the
user's cron table. When inserting entries, we add magic "BEGIN" and
"END" markers. When we later removes these entries, we remove everything
from "BEGIN" to ... the end of file. A realistic scenario for hitting
this bug is

  $ git maintenance start
  $ crontab -e # add stuff at the end of the file
  $ git maintenance stop
  $ crontab -l # stuff from above is gone

The second patch is the actual fix. The first patch is just a very minor
fix to the documentation. The third patch future-proofs the magic
markers, so that we can be reasonably sure that all future versions of
Git stick to these strings.

Martin Ågren (3):
  git-maintenance.txt: add missing word
  gc: fix handling of crontab magic markers
  t7900-maintenance: test for magic markers

 Documentation/git-maintenance.txt |  2 +-
 t/t7900-maintenance.sh            | 16 ++++++++++++++++
 builtin/gc.c                      |  7 +++----
 3 files changed, 20 insertions(+), 5 deletions(-)

-- 
2.30.0.rc1


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-12-23 20:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-21 21:26 [PATCH 0/3] gc: fix handling of crontab magic markers Martin Ågren
2020-12-21 21:26 ` [PATCH 1/3] git-maintenance.txt: add missing word Martin Ågren
2020-12-21 21:26 ` [PATCH 2/3] gc: fix handling of crontab magic markers Martin Ågren
2020-12-22 22:45   ` Junio C Hamano
2020-12-22 23:22     ` Junio C Hamano
2020-12-23  3:50     ` Eric Sunshine
2020-12-23 10:06       ` Martin Ågren
2020-12-23 20:00         ` Junio C Hamano
2020-12-21 21:26 ` [PATCH 3/3] t7900-maintenance: test for " Martin Ågren
2020-12-21 21:54 ` [PATCH 0/3] gc: fix handling of crontab " Derrick Stolee

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.