问题描述
我想建立一个bzr存储库,该存储库不需要我处理空行的增加或减少.
I would like to set up a bzr repository that does not require me to deal with the addition or subtraction of empty lines.
有可能这样做吗?
有任何潜在的不利之处吗?我的代码在R和bash中.
Are there any potential disadvantages? My code is in R and bash.
推荐答案
在使用bzr diff比较存储库或修订版时,可以使用diff-options将选项传递到标准UNIX diff命令.
When comparing repositories or revisions using bzr diff, you can use diff-options to pass options through to the standard UNIX diff command.
我一直无法找到一种方法来优雅地处理空白更改(制表符到空格,或空格到选项卡).在执行合并时,我也一直无法找到处理任何空白更改的方法.
I've been unable to find a way to handle whitespace changes (tab to spaces, or spaces to tabs) gracefully. I've also been unable to find a way to handle any sort of whitespace changes when performing a merge.
//show the difference between two revisions, omitting whitespace-only changes.
cd my_repo
bzr diff --diff-options='-w' ../my_other_repo
or
//show changes from 451 through 455, omitting whitespace-only changes.
bzr diff -r450..455 --diff-options='-w'
//this is what I use for doing quick code reviews (no whitespace, 15 lines of context)
bzr diff --diff-options='-w -U 15'
这篇关于比较修订版本时,bzr可以忽略空行吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!