git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Hahler <genml+git-2014@thequod.de>
To: git@vger.kernel.org
Subject: Please use distinct messages for "unable to read" errors (with corrupt repo after "git stash -k")
Date: Wed, 18 Feb 2015 20:56:06 +0100	[thread overview]
Message-ID: <54E4EE56.3080703@thequod.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 1138 bytes --]

Hi,

I've just experienced an issue, where the system hung after "git stash -k",
and I've had to use Alt-SysRq-REISUB to reboot.

Afterwards "git diff" and "git status" failed with:

"fatal: unable to read 7eaa1fb32551b16198924bfb8b9d3674fed2a59a"

When looking at Git's source I've found several places that use the same call
to `die`:

    die(_("unable to read %s")

I think it would be more helpful to have distinct messages for each of them,
which would at least make it easier to find out where it is failing.


As for the issue at hand, I could not find the reference `7eaa1fb3` anywhere,
except for it being an empty object in .git/objects, which I've deleted then.

It looked like 7eaa1fb should have become the new stash reference, but then
the system crash happened before it has been finished/done.

But where did Git pick it from after reboot / with the corrupt repo?


I could fix it by cloning the repository locally again, and then
copying/merging the configuration, stash references etc.

I was using Git v2.3.0 when this happened.


Regards,
Daniel.

-- 
http://daniel.hahler.de/


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 173 bytes --]

                 reply	other threads:[~2015-02-18 19:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54E4EE56.3080703@thequod.de \
    --to=genml+git-2014@thequod.de \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).