我将更改保存到存储中。添加一些代码。提交。
当我尝试应用隐藏的更改时,出现合并冲突:
@@@ -847,45 -846,6 +855,53 @@@ do $$ begin RAISE NOTICE 'Move time: 20
set local my.sys_time to '2018-08-23';
do $$ begin
++<<<<<<< Updated upstream
+do $$ begin RAISE NOTICE 'Move time: 2018-08-23'; end $$ language 'plpgsql';
+set local my.sys_time to '2018-08-23';
+
+do $$ begin
+--TODO: Test UPDATE when NEW.app_period is same as OLD.app_period
+-- and NEW.app_period is intersect app_period() for some rows
+--As update behavior should be same for rows where NEW and OLD
+-- as different as equal (see next test after this one)
++||||||| merged common ancestors
++--TODO: Test UPDATE when NEW.app_period is same as OLD.app_period
++-- and NEW.app_period is intersect app_period() for some rows
++--As update behavior should be same for rows where NEW and OLD
++-- as different as equal (see next test after this one)
++=======
++>>>>>>> Stashed changes
RAISE NOTICE 'Test UPDATE app_period by 2018-08-17 .. 2018-08-24, when applicatoin perio
USING HINT = 'Row just updated. Nothing special should happen';
end $$ language 'plpgsql';
但是为什么呢?隐藏的更改不会对发生冲突的commented TODO
行增加任何作用。
答案 0 :(得分:1)
Git不会默默地假设两个紧邻的文本块是不相关的,因为它们经常是相关的。在另一个合并中,您添加的块是注释,该注释描述了已移至其他位置或已排除的功能。
答案 1 :(得分:0)
冲突表示,文件已至少两次更改,以并行方式。就像叉子一样:
Shuffle Errors
BAD_ID=0
CONNECTION=0
IO_ERROR=0
WRONG_LENGTH=0
WRONG_MAP=0
WRONG_REDUCE=0
您可以通过对变更进行排序来解决冲突,并按时间顺序将其水平放置:
Common ancestor -----> V1
-----> V2
文件更改的哪一部分都没有关系,文件更改的方式(并行而不是顺序)会产生冲突。