Subject: Re: [PATCH 08/10] contrib: remove "git-resurrect.sh"

From: Junio C Hamano <[email-masked]>
Date: Tue, 06 May 2025 13:11:37 -0700

Patrick Steinhardt <[email-masked]> writes:

> The "git-resurrect.sh" script can be used to find traces of a branch tip
> in the reflog and resurrect that branch. Despite a couple of global
> cleanups, the script hasn't seen any activity since it was introduced in
> e1ff064e1bf (contrib git-resurrect: find traces of a branch name and
> resurrect it, 2009-02-04).

A single-purpose thing that is done correctly on top of a right
abstraction does not necessarily need further updates, so I doubt
this paragraph contributes to the decision to remove the script in
any way.

Having said that, I would not be surprised at all if large bugs
still remain in the script.  The reason why we scarcely heard
complaints about it is due to the fact that people simply are not
aware of it, people do not lose branches too often, and when it
happens, it is crystal clear what needs to be done with the output
of "git reflog HEAD@{0}", once people learn about "git reflog".
Even though it may be tedious to inspect "git reflog" output and
pick the right record to use with "git branch" to resurrect, as long
as it is a one-off thing, it would be more assuring to end-users than
some rarely used script with no correctness guarantee magically picks
a commit to place on the "resurrected" branch tip, I suspect.

So I personally do not think many people shed tears if we remove
this script.  I am for its removal.

Do we have a better alternative we officially support, by the way?