From: Junio C Hamano <gitster@pobox.com>
To: Marco Stephan <marc.stephan96@hotmail.de>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: Git revert cannot be aborted if the repository directory has been copied
Date: Sat, 02 Nov 2024 19:34:43 -0700 [thread overview]
Message-ID: <xmqqo72xxcxo.fsf@gitster.g> (raw)
In-Reply-To: <AM0PR02MB4980D186BDC087336C760132E6502@AM0PR02MB4980.eurprd02.prod.outlook.com> (Marco Stephan's message of "Sun, 3 Nov 2024 01:25:12 +0000")
Marco Stephan <marc.stephan96@hotmail.de> writes:
> If you copy a Git repository directory to another path while there is a revert in progress for the Git repository, "git revert --abort" does not work anymore for the copied repository. Instead, it will report an error of the following format:
> error: Entry '...' not uptodate. Cannot merge.
> fatal: Could not reset index file to revision '...'.
I wonder if
$ git update-index --refresh
is all it takes. The symptom, i.e. Git declares that an otherwise
unmodifed path is not uptodate, is not limited to "revert" or
aborting it, but is a common thing a newbie sees after copyihg a
working tree to elsewhere, and "refresh the index" is an often given
recovery procedure for such a situation.
I'll not comment if this is a bug or not, and let others argue.
next prev parent reply other threads:[~2024-11-03 2:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-03 1:25 Git revert cannot be aborted if the repository directory has been copied Marco Stephan
2024-11-03 2:34 ` Junio C Hamano [this message]
2024-11-03 15:04 ` Kristoffer Haugsbakk
2024-11-03 15:07 ` Kristoffer Haugsbakk
2024-11-03 15:13 ` Kristoffer Haugsbakk
2024-11-03 17:33 ` AW: " Marco Stephan
2024-11-04 9:55 ` Phillip Wood
2024-11-07 19:52 ` AW: " Marco Stephan
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=xmqqo72xxcxo.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=marc.stephan96@hotmail.de \
/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).