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

[RFC 4/4] gitk: Use adddiffline to nicely format diff-diff

From
Steffen Prohaska <prohaska@zib.de>
Date
Dec 15, 2007, 16:51 UTC
Message-ID
<11977375052395-git-send-email-prohaska@zib.de>
In-Reply-To
<11977375051617-git-send-email-prohaska@zib.de>
---
 gitk-git/gitk |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/gitk-git/gitk b/gitk-git/gitk
index 3c4ec03..31b2b5f 100644
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -6059,8 +6059,9 @@ proc doseldiffdiff {oldid newid} {
 
     set diff [exec git diff-diff $oldid $newid]
     $ctext conf -state normal
-    $ctext insert end "\n"
-    $ctext insert end $diff
+    foreach line [split $diff "\n"] {
+	adddiffline $line [list $oldid $newid]
+    }
     $ctext conf -state disabled
 }
 
-- 
1.5.4.rc0.37.geff3a-dirty
Previous: Steffen ProhaskaNext: Johannes Schindelin
Message 4 of 8 in “[RFC 1/4] Add diff-diff, which compares the diffs of two commits”
  1. Steffen ProhaskaDec 15, 2007
  2. 2/4 gitk: Add diff-diff supportSteffen Prohaska, Dec 15, 2007
  3. 3/4 gitk: Refactor getblobdiffline to split off adddifflineSteffen Prohaska, Dec 15, 2007
  4. 4/4 gitk: Use adddiffline to nicely format diff-diffSteffen Prohaska, Dec 15, 2007
  5. Johannes SchindelinDec 15, 2007
  6. Björn SteinbrinkDec 15, 2007
  7. Steffen ProhaskaDec 15, 2007
  8. Junio C HamanoDec 15, 2007

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.