-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make git reflog expire --stale-fix
a lot more useful
#873
Make git reflog expire --stale-fix
a lot more useful
#873
Conversation
Whenever a user runs `git reflog expire --stale-fix`, the most likely reason is that their repository is at least _somewhat_ corrupt. Which means that it is more than just possible that some objects are missing. If that is the case, that can currently let the command abort through the phase where it tries to mark all reachable objects. Instead of adding insult to injury, let's be gentle and continue as best as we can in such a scenario, simply by ignoring the missing objects and moving on. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
e598d72
to
c0d5f65
Compare
/submit |
Submitted as pull.873.git.1612973499110.gitgitgadget@gmail.com To fetch this version into
To fetch this version to local tag
|
On the Git mailing list, Junio C Hamano wrote (reply to this):
|
On the Git mailing list, Jeff King wrote (reply to this):
|
User |
This branch is now known as |
This patch series was integrated into seen via git@8d144f4. |
On the Git mailing list, Johannes Schindelin wrote (reply to this):
|
On the Git mailing list, Junio C Hamano wrote (reply to this):
|
This patch series was integrated into seen via git@857a021. |
This patch series was integrated into next via git@899034e. |
This patch series was integrated into seen via git@e68f62b. |
This patch series was integrated into next via git@e68f62b. |
This patch series was integrated into master via git@e68f62b. |
Closed via e68f62b. |
Yesterday, I tried to run a quick test to find out whether
master
's version ofgit repack
prevents.bitmap
files from being deleted by still having themmmap()
ed. Since I do not have a build ofmaster
lying around just like that, I checked it out, built the thing, and then ranDo NOT try this at home! The problem with this invocation is that the alias will still have
GIT_DIR
set, therefore thegit init
in that script will not create a new Git directory, and thegit repack -ad
in that script will remove all kinds of precious objects from the Git checkout. Even though I interrupted the run as quickly as I realized that things were going wrong, my repository was corrupted in a major way, and it took me many hours to get back to a healthy state.It made matters worse that
git reflog expire --stale-fix
was less helpful than it could have been, and this patch is the result of my directed emotional energy.cc: Jeff King peff@peff.net