git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH (GITK) 4/6] gitk: Fixed broken exception handling in diff.

From
Alexander Gavrilov <angavrilov@gmail.com>
Date
Jul 27, 2008, 06:20 UTC
Message-ID
<200807271020.53171.angavrilov@gmail.com>
In-Reply-To
<200807271020.02415.angavrilov@gmail.com>
Date: Sat, 26 Jul 2008 18:48:41 +0400

If the tree diff command failed to start for some random reason, treepending remained set, and thus no more diffs were shown after that.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
---
 gitk |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/gitk b/gitk
index d7fea26..abb6542 100755
--- a/gitk
+++ b/gitk
@@ -6457,9 +6457,10 @@ proc diffcmd {ids flags} {
 proc gettreediffs {ids} {
     global treediff treepending
 
+    if {[catch {set gdtf [open [diffcmd $ids {--no-commit-id}] r]}]} return
+
     set treepending $ids
     set treediff {}
-    if {[catch {set gdtf [open [diffcmd $ids {--no-commit-id}] r]}]} return
     fconfigure $gdtf -blocking 0
     filerun $gdtf [list gettreediffline $gdtf $ids]
 }
-- 
1.5.6.3.18.gfe82
Previous: Alexander GavrilovNext: Alexander Gavrilov
Message 5 of 10 in “Runaway process and commit selection fixes”
  1. 0/6 Runaway process and commit selection fixesAlexander Gavrilov, Jul 27, 2008
  2. 1/6 gitk: Kill back-end processes on window close.Alexander Gavrilov, Jul 27, 2008
  3. 2/6 gitk: Register diff-files & diff-index in commfd, to ensure kill.Alexander Gavrilov, Jul 27, 2008
  4. 3/6 gitk: On Windows use a Cygwin-specific flag for kill.Alexander Gavrilov, Jul 27, 2008
  5. 4/6 gitk: Fixed broken exception handling in diff.Alexander Gavrilov, Jul 27, 2008
  6. 5/6 gitk: Fixed automatic row selection during load.Alexander Gavrilov, Jul 27, 2008
  7. 6/6 gitk: Fallback to selecting the head commit upon load.Alexander Gavrilov, Jul 27, 2008
  8. Paul MackerrasJul 31, 2008
  9. Alexander GavrilovJul 31, 2008
  10. gitk: Allow overriding the default commit.Alexander Gavrilov, Aug 3, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.