Re: [PATCH v2] push: fix --force-if-includes when remote-tracking ref has no reflog
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 8, 2026, 03:47 UTC
- Message-ID
- <xmqqjyowz9oq.fsf@gitster.g>
- In-Reply-To
- <20260906165052.21780-1-f@lex.la>
Aleksei Sviridkin <f@lex.la> writes:
Show 7 quoted lines
> Junio C Hamano <gitster@pobox.com> writes: >> Which suggests to me that gc.reflogExpire or 90 days ago would be a >> lot more reasonable than year 1970 to use as a fallback cutoff date. > > Entries older than 90 days do survive. The reflog expires when gc or > "git reflog expire" runs, not on its own, so I could build a branch > whose matching reflog entry is 200 days old and still sitting there.
It is only true for those who conciously disable the gc, isn't it?
It all depends on how hard it is to recover from such a failure, and it may not even matter in practice what value we set, as it will become a non-issue once they pull from there or push into there even once.
But in the context of discussing what the fallback default ought to be, I somehow sounds more like a poor excuse rather than a sensible argument. Doesn't it force a behaviour that would happen only to those people who deliberately choose to ignore cutoff and who are willing to spend cycles to go back to the beginning of history, to all users, including those who do not make such customization, no?