git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Git revert cannot be aborted if the repository directory has been copied

From
KHKristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com>
Date
Nov 3, 2024, 15:07 UTC
Message-ID
<bb6d781e-fc67-4790-a3a9-8b672dcfe7a0@app.fastmail.com>
In-Reply-To
<9fd66b8f-c457-451b-9862-6121128b2786@app.fastmail.com>
On Sun, Nov 3, 2024, at 16:04, Kristoffer Haugsbakk wrote:
Show 16 quoted lines
> On Sun, Nov 3, 2024, at 03:34, Junio C Hamano wrote:
>> 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.
>
>
> This is correct.  This successful test can be added to
> t3501-revert-cherry-pick.sh:
(Meaning one can add it there if one wants to see for themselves)
-- 
Kristoffer Haugsbakk
Previous: Kristoffer HaugsbakkNext: Kristoffer Haugsbakk
Message 4 of 8 in “Git revert cannot be aborted if the repository directory has been copied”
  1. Marco StephanNov 3, 2024
  2. Junio C HamanoNov 3, 2024
  3. Kristoffer HaugsbakkNov 3, 2024
  4. Kristoffer HaugsbakkNov 3, 2024
  5. Kristoffer HaugsbakkNov 3, 2024
  6. AW: Git revert cannot be aborted if the repository directory has been copiedMarco Stephan, Nov 3, 2024
  7. Phillip WoodNov 4, 2024
  8. AW: Git revert cannot be aborted if the repository directory has been copiedMarco Stephan, Nov 7, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.