这有可能以任何方式吗?我试过git config --global alias.diff 'diff -b -w'
,但不幸的是,这不是解决方案。Gitk:默认设置为“忽略空间更改”选项为
8
A
回答
4
注:现在(9月2014年以后)更新gitk config_variables
并添加ignorespace
https://github.com/git/git/commit/9fabefb1f3f658e77eb18afa3f95efe1a0ee8d0d
所有这些都刷新到.gitk
文件。
5
这里真正需要的是在UI上保持由checkbutton设置的变量的值。以下补丁实现了这一点。或者你可以强制默认值在11475行(set ignorespace 1
)为真。
From 54f9e800fe28cd6d5d0d44d4e2e561263cbf3407 Mon Sep 17 00:00:00 2001
From: Pat Thoyts <[email protected]>
Date: Tue, 13 Dec 2011 11:39:01 +0000
Subject: [PATCH] gitk: persist the value of the ignorespace setting for
diffs.
Signed-off-by: Pat Thoyts <[email protected]>
---
gitk-git/gitk | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/gitk-git/gitk b/gitk-git/gitk
index 2a92e20..29b18d9 100755
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -2653,7 +2653,7 @@ proc savestuff {w} {
global cmitmode wrapcomment datetimeformat limitdiffs
global colors uicolor bgcolor fgcolor diffcolors diffcontext selectbgcolor
global autoselect autosellen extdifftool perfile_attrs markbgcolor use_ttk
- global hideremotes want_ttk
+ global hideremotes want_ttk ignorespace
if {$stuffsaved} return
if {![winfo viewable .]} return
@@ -2690,6 +2690,7 @@ proc savestuff {w} {
puts $f [list set selectbgcolor $selectbgcolor]
puts $f [list set extdifftool $extdifftool]
puts $f [list set perfile_attrs $perfile_attrs]
+ puts $f [list set ignorespace $ignorespace]
puts $f "set geometry(main) [wm geometry .]"
puts $f "set geometry(state) [wm state .]"
--
1.7.8.msysgit.0
6
这有点旧,但我发现这个问题在前一天使用Google搜索,已经接受的答案给了我一个如何去做的暗示。
无需修改gitk本身:只需编辑您的.gitk文件(〜/的.config /混帐/ gitk或〜/ .gitk)并添加:
set ignorespace 1
相关问题
- 1. Rails 3 inherited_resources忽略'默认'设置
- 2. 默认选择选项为空
- 3. 添加空白选项并将其设为默认选择
- 4. 如何选择null设置为“no”且默认设置为“none”的空字段
- 5. 如何将选择2默认新标签键“选项卡”更改为“空格”?
- 6. 为NSPopupButton设置默认选择?
- 7. 设置选择器默认为CoreData值?
- 8. 如何更改默认设置为当前时间的时间戳?
- 9. 做选项默认为零?
- 10. 如何配置phpstorm,以便默认行为是忽略VCS?
- 11. 如何为xml命名空间设置默认值?
- 12. 为openxml设置默认的xml命名空间
- 13. 更改默认行为5.4
- 14. Git默认忽略配置目录
- 15. 将OpenFileDialog设置为默认为缩略图视图
- 16. 将document.title设置为默认
- 17. 为Sinatra设置默认content_type
- 18. Mysql设置为默认?
- 19. 将默认选择的项目更改为无
- 20. 如何忽略struts2中的默认命名空间
- 21. 将MS项目持续时间设置为默认编辑
- 22. 似乎无法为选择选项设置默认选项;使用Angular
- 23. 如何在Grails中将域字段的默认设置更改为可空
- 24. 如何将R设置为默认选项?
- 25. Tablesorter寻呼机选项将默认行设置为5
- 26. Yii为自定义的CGridView设置默认选项
- 27. 将Docker附加选项--sig-proxy = false设置为默认
- 28. 如何为多个xml首选项设置默认值?
- 29. 为骨干集合设置默认选项
- 30. 无论我们将tab2设置为默认选项卡
为什么不是解决方案? (如http://stackoverflow.com/questions/2500586/setting-git-default-flags-on-commands所示)。因为默认情况下设置标志仍然不可能:http://stackoverflow.com/questions/1278296/is-there-any-way-to-set-a-flag-by-default-for-a -git-command – VonC
它不起作用,因为它不会影响gitk在diff中的行为。 – prusswan
好的。我没有看到标题中的“gitk”。 – VonC