邪恶在 git 中合并? [英] Evil merges in git?

查看:25
本文介绍了邪恶在 git 中合并?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

"man gitglossary" 包含了一个邪恶合并的定义:

"man gitglossary" contains this definition of an evil merge:

一个邪恶的合并是一个合并,它引入了没有出现的变化在任何父级中.

An evil merge is a merge that introduces changes that do not appear in any parent.

我不确定我是否理解作者试图表达的观点.为什么是邪恶的?

I am not sure I understand the point the authors are trying to get at. Why is it evil ?

推荐答案

因为它在代码中放入了没人要求的东西.好像你有这个代码:

Because it's putting things in the code that no one ever asked to be there. As if you had this code:

$foo = bar;
$baz = qxx;

和这个变化:

$foo = bar;
$foo++;
$baz = qxx;

与此更改合并:

$foo = bar;
$foo--;
$baz = qxx;

以某种方式产生的方式:

in a fashion that somehow produced:

$foo = bar;
$foo++;
$foo--;
--$baz;
$baz = qxx;

显然,这是邪恶的.

我想在 man gitglossary 中已经足够令人担忧了,因为您的合并算法涉及的越多,它们产生这种结果的可能性就越大.

I would guess that it's of enough concern to be in man gitglossary because the more involved your merging algorithms are, the more likely it is that they will produce such a thing.

这篇关于邪恶在 git 中合并?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆