[PATCH] Corrected cmitmode set in the right lower window when initiating a diff.
- From
- Michał Pomorski <misieck@gmail.com>
- Date
- Nov 23, 2010, 02:32 UTC
- Message-ID
- <1290479526-21167-1-git-send-email-michal.pomorski@scalado.com>
- 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