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

[PATCH] gitk: Heed the lines of context in merge commits.

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Feb 13, 2008, 16:27 UTC
Message-ID
<47B31A72.7020502@viscovery.net>
From: Johannes Sixt <johannes.sixt@telecom.at>

There is an edit box where the number of context lines can be chosen. But it was only used when regular diffs were displayed, not for merge commits. Fix this.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
---
 gitk |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/gitk b/gitk
index 7a97cc8..b20fa81 100644
--- a/gitk
+++ b/gitk
@@ -5028,13 +5028,14 @@ proc getblobline {bf id} {
 proc mergediff {id l} {
     global diffmergeid mdifffd
     global diffids
+    global diffcontext
     global parentlist
     global limitdiffs viewfiles curview

     set diffmergeid $id
     set diffids $id
     # this doesn't seem to actually affect anything...
-    set cmd [concat | git diff-tree --no-commit-id --cc $id]
+    set cmd [concat | git diff-tree --no-commit-id --cc -U$diffcontext $id]
     if {$limitdiffs && $viewfiles($curview) ne {}} {
 	set cmd [concat $cmd -- $viewfiles($curview)]
     }
-- 
1.5.4.43.gbd39-dirty
Next: Paul Mackerras
Message 1 of 2 in “gitk: Heed the lines of context in merge commits.”
  1. gitk: Heed the lines of context in merge commits.Johannes Sixt, Feb 13, 2008
  2. Paul MackerrasFeb 13, 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.