Subversion 配置:diff3-has-program-arg 的用途是什么?
Subversion 有选项 diff3-has-program-arg
### Set diff3-has-program-arg to 'yes' if your 'diff3' program ### accepts the '--diff-program' option. diff3-has-program-arg = [ yes | no ]
我的 diff3
确实支持 --diff-program
选项,但我不知道在哪里配置要调用的程序。
- 我该怎么做?
- 我为什么要这样做?
Subversion has the option diff3-has-program-arg
### Set diff3-has-program-arg to 'yes' if your 'diff3' program ### accepts the '--diff-program' option. diff3-has-program-arg = [ yes | no ]
My diff3
does support the --diff-program
option, but I don't see where to configure the program to be called.
- How do I do this?
- Why would I do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
diff3-has-program-arg
似乎很糟糕。该选项在libsvn_subr/io 中引用.c
,但使用该选项的代码被SVN_DIFF3_HAS_DIFF_PROGRAM_ARG
ifdef 禁用。设置该宏的配置逻辑已在此修订版中删除。
来自 svn 开发列表上的旧邮件,看起来像HAS_DIFF_PROGRAM_ARG 的最初需求是在实现之前支持需要
--diff-program
选项的 diff 版本和拒绝该选项的版本Subversion 的内部差异支持。diff3-has-program-arg
appears to be cruft. The option is referenced inlibsvn_subr/io.c
, but the code that uses the option is disabled by theSVN_DIFF3_HAS_DIFF_PROGRAM_ARG
ifdef.The configure logic to set that macro was removed in this revision.
From an old mail on the svn dev list, it looks like the original need for HAS_DIFF_PROGRAM_ARG was to support both a version of diff that required the
--diff-program
option and a version that rejected it, prior to implementation of subversion's internal diff support.--- 执行一些测试后编辑 ---
--diff-program=value
选项基本上指示diff3
使用哪个两个文件差异检查程序。然后,diff3
将从两个文件差异检查程序的几次运行中获取输出,并将它们交织成三路差异输出。使用
diff3 --diff-program=diff ab c
有效地告诉diff3
使用diff
作为双向文件差异程序。 subversion 配置参数diff3-has-program-arg
是 subversion 的一个标志,用于在调用 3 路 diff 程序时添加--diff-program=xxx
参数。我敢打赌,还有另一个选项可以让您也设置双向比较工具。我猜那次灰胡子并没有跟我开玩笑,但他这么做的时候更有趣。只要问任何编写过 bash shell 炸弹的人,他们就会同意(在痛苦结束后)。
--- 原帖如下 ---
来自旧的 diff3 页面< /a>(谢谢 GNU)。
它激活 diff 使用外部比较程序(而不是内部文本匹配器)的能力。我从未见过它被使用过,但一位老灰胡子曾经向我解释过,它的目的比文本比较程序更好,比如规范化不同“C”输入之间的空格的程序,这样差异就不会失去对齐。由于制表符/空格转换问题(等等)。
我很想知道这是真的,还是只是一个对当时还很“绿色”的人来说的幻想神话。
--- Edited after some testing was performed ---
The
--diff-program=value
option basically directsdiff3
as to which two file difference checking program to use.diff3
will then take the output from a few runs of the two file difference checking program and interleave them into a three way diff output.Using
diff3 --diff-program=diff a b c
effectively tellsdiff3
to usediff
as the two way file difference program. The subversion configuration argumentdiff3-has-program-arg
is a flag to subversion to add the--diff-program=xxx
parameter when calling the 3 way diff program. I'll bet there's another option somewhere which allows you to set the two way diffing tool too.I guess that greybeard wasn't pulling my leg (that time), but it was more fun when he was. Just ask anyone who's coded up a bash shell bomb, they'll agree (after the pain is over).
--- Original post follows ---
From the old diff3 pages (thank you GNU).
which activates diff's ability to use an external comparison program (instead of it's internal text matcher). I've never seen it used, but an old greybeard once explained it to me that it was intended for better than text comparison programs, like programs that normalized whitespace between different "C" inputs so the diff wouldn't be thrown out of alignment due to tab / space conversion issues (and the like).
I am curious to know if this is true, or just a fanciful myth told to a person who was quite "green" at the time.