git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
* Re: [BUG]: Destructive behaviour of git revert
       [not found] <CAP82knNJ7YH30R-Z61ake58qERp--6hdvgGasKpHQ2TbMPraiA@mail.gmail.com>
@ 2019-07-30 17:24 ` Andreas Wiesinger
  2019-07-30 18:36   ` Phillip Wood
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Wiesinger @ 2019-07-30 17:24 UTC (permalink / raw)
  To: git

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [BUG]: Destructive behaviour of git revert
  2019-07-30 17:24 ` [BUG]: Destructive behaviour of git revert Andreas Wiesinger
@ 2019-07-30 18:36   ` Phillip Wood
  0 siblings, 0 replies; 2+ messages in thread
From: Phillip Wood @ 2019-07-30 18:36 UTC (permalink / raw)
  To: Andreas Wiesinger, git

Hi Andreas

On 30/07/2019 18:24, Andreas Wiesinger wrote:
> 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.

Thanks for creating an example. I've had a quick look at it and it 
appears that you have a merge that adds a new file from the branch being 
merged, then when you revert the merge that file is deleted. Could you 
explain what you want to happen when you revert that merge? The idea of 
revert is to undo the changes introduced by the commit that is being 
reverted, I'm struggling to understand why you think revert should not 
do this for files that are added.

Best Wishes

Phillip

> 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
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-07-30 18:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAP82knNJ7YH30R-Z61ake58qERp--6hdvgGasKpHQ2TbMPraiA@mail.gmail.com>
2019-07-30 17:24 ` [BUG]: Destructive behaviour of git revert Andreas Wiesinger
2019-07-30 18:36   ` Phillip Wood

git@vger.kernel.org list mirror (unofficial, one of many)

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 git git/ https://public-inbox.org/git \
		git@vger.kernel.org
	public-inbox-index git

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.version-control.git
	nntp://ie5yzdi7fg72h7s4sdcztq5evakq23rdt33mfyfcddc5u3ndnw24ogqd.onion/inbox.comp.version-control.git
	nntp://4uok3hntl7oi7b4uf4rtfwefqeexfzil2w6kgk2jn5z2f764irre7byd.onion/inbox.comp.version-control.git
	nntp://news.gmane.io/gmane.comp.version-control.git
 note: .onion URLs require Tor: https://www.torproject.org/

code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/git.git

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git