這有可能以任何方式嗎?我試過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