@matheusbsbs / matheus-bagliano / commits / ebf336b942
Fork 0

git-gui: Allow the user to disable diff stat summary during pull.

Because the pull diffstat summary can take as long as the pull itself some users may just choose to disable the summary and save themselves an extra few seconds during each pull. This is especially true if the user really doesn't care about the other files being modified, as due to their project organizational structure they aren't really responsible for their content. This adds an option to the options panel which lets the user disable the diffstat summary (and thus we pass --no-summary to git-pull) but there does appear to be a bug in the config saving code where we did not set the local repo config differently from the global config. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Shawn O. Pearce committed Nov 12, 2006 at 16:53 UTC ebf336b9422302ec89bce14b83017060d7ccd3e6
1 file changed +6 -2
git-gui
+6 -2
@@ -896,8 +896,7 @@ proc fetch_from {remote} {
896 }
897
898 proc pull_remote {remote branch} {
899 - global HEAD commit_type
900 - global file_states
899 + global HEAD commit_type file_states repo_config
900
901 if {![lock_index update]} return
902
@@ -933,6 +932,9 @@ Commit or throw away all changes before starting a pull operation.
932 set w [new_console "pull $remote $branch" \
933 "Pulling new changes from branch $branch in $remote"]
934 set cmd [list git pull]
935 + if {$repo_config(gui.pullsummary) == {false}} {
936 + lappend cmd --no-summary
937 + }
938 lappend cmd $remote
939 lappend cmd $branch
940 console_exec $w $cmd [list post_pull_remote $remote $branch]
@@ -1760,6 +1762,7 @@ proc do_options {} {
1762 pack $w.global -side right -fill both -expand 1 -pady 5 -padx 5
1763
1764 foreach option {
1765 + {pullsummary {Show Pull Summary}}
1766 {trustmtime {Trust File Modification Timestamps}}
1767 } {
1768 set name [lindex $option 0]
@@ -1916,6 +1919,7 @@ proc apply_config {} {
1919 }
1920
1921 set default_config(gui.trustmtime) false
1922 +set default_config(gui.pullsummary) true
1923 set default_config(gui.fontui) [font configure font_ui]
1924 set default_config(gui.fontdiff) [font configure font_diff]
1925 set font_descs {