Re: [PATCH v2] reflog: fix default expiry periods
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 24, 2026, 17:43 UTC
- Message-ID
- <xmqqik3u35pq.fsf@gitster.g>
- In-Reply-To
- <arUvtE67n5_MFM4C@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 26 quoted lines
> On Wed, Sep 23, 2026 at 12:26:51PM -0700, Junio C Hamano wrote:
>> Pushkar Singh <pushkarkumarsingh1970@gmail.com> writes:
>>
>> > The default reflog expiry periods were swapped when they were moved to
>> > REFLOG_EXPIRE_OPTIONS_INIT() by 85658275702b (builtin/reflog: stop storing
>> > default reflog expiry dates globally).
>> >
>> > This caused reachable entries to expire after 30 days instead of 90 days,
>> > and unreachable entries after 90 days instead of 30 days.
>> >
>> > Reported-by: r.norouzi <r.norouzi@proton.me>
>> > Signed-off-by: Pushkar Singh <pushkarkumarsingh1970@gmail.com>
>> > ---
>>
>> The above reads very well.
>>
>> > #define REFLOG_EXPIRE_OPTIONS_INIT(now) { \
>> > - .default_expire_total = now - 30 * 24 * 3600, \
>> > - .default_expire_unreachable = now - 90 * 24 * 3600, \
>> > + .default_expire_total = now - 90 * 24 * 3600, \
>> > + .default_expire_unreachable = now - 30 * 24 * 3600, \
>> > }
>>
>> and the fix is very straight-forward.
>
> Is this something that we want to fast-track for Git 2.56?Probably. The accompanied tests in the patch was not as nice as what is quoted above, if I recall correctly, though.