author | Shawn O. Pearce <spearce@spearce.org> | |
Sun, 18 Feb 2007 07:12:32 +0000 (02:12 -0500) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Sun, 18 Feb 2007 07:12:32 +0000 (02:12 -0500) | ||
commit | 372ef954a15c321a1065bf7e764449ce7767277f | |
tree | f52c5bc696f5cf4d93e1ad400cedffae05e385e9 | tree | snapshot |
parent | b90d479255d3b47e3604493b58e271cb9cd8dccd | commit | diff |
git-gui: Correct crash when saving options in blame mode.
Martin Waitz noticed that git-gui crashed while saving the user's
options out if the application was started in blame mode. This
was caused by the do_save_config procedure invoking reshow_diff
incase the number of context lines was modified by the user.
Because we bypassed main window UI setup to enter blame mode we
did not set many of the globals which were accessed by reshow_diff,
and reading unset variables is an error in Tcl.
Aside from moving the globals to be set earlier, I also modified
reshow_diff to not invoke clear_diff if there is no path currently
in the diff viewer. This way reshow_diff does not crash when in
blame mode due to the $ui_diff command not being defined.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Martin Waitz noticed that git-gui crashed while saving the user's
options out if the application was started in blame mode. This
was caused by the do_save_config procedure invoking reshow_diff
incase the number of context lines was modified by the user.
Because we bypassed main window UI setup to enter blame mode we
did not set many of the globals which were accessed by reshow_diff,
and reading unset variables is an error in Tcl.
Aside from moving the globals to be set earlier, I also modified
reshow_diff to not invoke clear_diff if there is no path currently
in the diff viewer. This way reshow_diff does not crash when in
blame mode due to the $ui_diff command not being defined.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui.sh | diff | blob | history |