+
Skip to content

git-gui: add config value gui.diffopts for passing additional diff options #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Documentation/config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1100,6 +1100,10 @@ gui.diffcontext::
Specifies how many context lines should be used in calls to diff
made by the linkgit:git-gui[1]. The default is "5".

gui.diffopts::
Specifies additional parameters to pass to diff from
linkgit:git-gui[1]. The default is "".

gui.encoding::
Specifies the default encoding to use for displaying of
file contents in linkgit:git-gui[1] and linkgit:gitk[1].
Expand Down
1 change: 1 addition & 0 deletions git-gui/git-gui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,7 @@ set default_config(gui.fastcopyblame) false
set default_config(gui.copyblamethreshold) 40
set default_config(gui.blamehistoryctx) 7
set default_config(gui.diffcontext) 5
set default_config(gui.diffopts) {}
set default_config(gui.commitmsgwidth) 75
set default_config(gui.newbranchtemplate) {}
set default_config(gui.spellingdictionary) {}
Expand Down
1 change: 1 addition & 0 deletions git-gui/lib/diff.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ proc start_show_diff {cont_info {add_opts {}}} {

lappend cmd -p
lappend cmd --color
set cmd [concat $cmd $repo_config(gui.diffopts)]
if {$repo_config(gui.diffcontext) >= 1} {
lappend cmd "-U$repo_config(gui.diffcontext)"
}
Expand Down
1 change: 1 addition & 0 deletions git-gui/lib/option.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ proc do_options {} {
{i-20..200 gui.copyblamethreshold {mc "Minimum Letters To Blame Copy On"}}
{i-0..300 gui.blamehistoryctx {mc "Blame History Context Radius (days)"}}
{i-1..99 gui.diffcontext {mc "Number of Diff Context Lines"}}
{t gui.diffopts {mc "Additional Diff Parameters"}}
{i-0..99 gui.commitmsgwidth {mc "Commit Message Text Width"}}
{t gui.newbranchtemplate {mc "New Branch Name Template"}}
{c gui.encoding {mc "Default File Contents Encoding"}}
Expand Down
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载