2011-08-05 96 views
8

可能重复:
git whitespace woes混帐合并忽略空格

我设置怎样才能不报告纯粹是由于由空格上合并冲突,像下面?

<<<<<<< HEAD 
    open RESDBFILE, "< $this_day_result_file_"; 
    while (my $resdbline_ = <RESDBFILE>) 
    { 
     my @rwords_ = split ' ', $resdbline_; 
     if (exists $uncaliberated_strategies_{$rwords_[0]}) 
     { # if this strategy_filename_base was there in @strategy_filevec_ 
     delete $uncaliberated_strategies_{$rwords_[0]}; 
     } 
    } 
    close RESDBFILE; 
======= 
     open RESDBFILE, "< $this_day_result_file_"; 
     while (my $resdbline_ = <RESDBFILE>) 
     { 
    my @rwords_ = split ' ', $resdbline_; 
    if (exists $uncaliberated_strategies_{$rwords_[0]}) 
    { # if this strategy_filename_base was there in @strategy_filevec_ 
     delete $uncaliberated_strategies_{$rwords_[0]}; 
    } 
     } 
     close RESDBFILE; 
>>>>>>> origin/stable 
+1

如果它不报告它,那怎样使合并?随意挑一个使用? – Andy

+0

@安迪非常好的问题!根据[ignore-all-space]选项的[docs](http://git-scm.com/docs/git-merge#_merge_strategies):“如果_their_版本仅引入空格更改为一行,则_our_版本如果_our_版本引入空白变化,但是_their_版本包含实质性更改,则使用_their_版本。“ – TachyonVortex

回答

2

您可以尝试设置core.whitespace config以查看是否有帮助。

+0

那不会。 core.whitespaces是关于要警告的一组问题,而不是关于合并。 –

13

尝试:

$ git merge -s ignore-all-space 

有关详细信息:

$ git help merge 
/whitespace 
+21

'git merge -Xignore-all-space'适用于我......也许它是一个版本的东西... – dsummersl

+1

同样的'git樱桃采摘-Xignore-all-space'。至少在(几乎)当前的版本。 – Deiwin