git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] Corrected cmitmode set in the right lower window when initiating a diff.
@ 2010-11-23  2:32 Michał Pomorski
  0 siblings, 0 replies; only message in thread
From: Michał Pomorski @ 2010-11-23  2:32 UTC (permalink / raw)
  To: git; +Cc: Michał Pomorski

Under certain circumstances it caused an error: bad text index "a:_number_" in treeopendir:
-Start gitk;
-Select the tree radio button in the lower right window;
-Choose a diff from the context menu in the main window (this->selected or vice versa)
-Observe the lower right window: a file list is displayed, but the radio button 'tree' remains selected
-Select one of the files listed. This should cause the error.

Because the variable cmitmode remains in the 'tree' setting, gitk is trying to calculate a tree view selection.
This patch corrects this by setting the cmitmode variable to 'patch' each time a diff is selected.
---
 gitk-git/gitk |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/gitk-git/gitk b/gitk-git/gitk
index 1b0e09a..5d76de4 100644
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -7330,8 +7330,9 @@ proc mergediff {id} {
 }
 
 proc startdiff {ids} {
-    global treediffs diffids treepending diffmergeid nullid nullid2
+    global treediffs diffids treepending diffmergeid nullid nullid2 cmitmode
 
+    set cmitmode patch
     settabs 1
     set diffids $ids
     catch {unset diffmergeid}
-- 
1.7.3.2

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-11-23  2:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-23  2:32 [PATCH] Corrected cmitmode set in the right lower window when initiating a diff Michał Pomorski

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).