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

Re: [BUG]: Destructive behaviour of git revert

From
AWAndreas Wiesinger <awiesing90@gmail.com>
Date
Jul 30, 2019, 17:24 UTC
Message-ID
<CAP82knOVE5RbcDbD-SqbkoZ_4qubi96n2p3M_vgc4xGFVwTpMw@mail.gmail.com>
In-Reply-To
<CAP82knNJ7YH30R-Z61ake58qERp--6hdvgGasKpHQ2TbMPraiA@mail.gmail.com>
Hello,

git revert for merges will mark merged files as deleted and commit them as if they would have been deleted, but that is for sure never what anybody would expect and has deleted many files unintentionally and unrecognized in our repo shortly.

I have reproduced this issue in a very small example repo here: https://gitlab.com/electrocnic/git-revert-destructive-behaviour/tree/master

Expected behaviour would be:

A reverted merge should never mark any files or directories as "deleted", and merging the branch where the other merge has been reverted should not lead to the deletion of those files.

I classify this behaviour as really really destructive and clearly a bug, even if this behaviour is by intention. It should not be by intention then..

Best regards, Andreas

Next: Phillip Wood
Message 1 of 2 in “Re: [BUG]: Destructive behaviour of git revert”
  1. Andreas WiesingerJul 30, 2019
  2. Phillip WoodJul 30, 2019

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.