git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Michał Pomorski" <misieck@gmail.com>
To: git@vger.kernel.org
Cc: "Michał Pomorski" <michal.pomorski@scalado.com>
Subject: [PATCH] Corrected cmitmode set in the right lower window when initiating a diff.
Date: Tue, 23 Nov 2010 03:32:06 +0100	[thread overview]
Message-ID: <1290479526-21167-1-git-send-email-michal.pomorski@scalado.com> (raw)
In-Reply-To: <y>

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

                 reply	other threads:[~2010-11-23  2:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1290479526-21167-1-git-send-email-michal.pomorski@scalado.com \
    --to=misieck@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=michal.pomorski@scalado.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).