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

2 messages from 2008-02-13 to 2008-02-13. Participants: Johannes Sixt, Paul Mackerras.
Thread: https://gitlist.dev/t/12074

## Johannes Sixt, 2008-02-13 16:27

Subject: [PATCH] gitk: Heed the lines of context in merge commits.
Message-ID: <47B31A72.7020502@viscovery.net>
URL: https://gitlist.dev/e/47B31A72.7020502%40viscovery.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

```

## Paul Mackerras, 2008-02-13 23:50

Subject: Re: [PATCH] gitk: Heed the lines of context in merge commits.
Message-ID: <18355.33363.669732.192506@cargo.ozlabs.ibm.com>
URL: https://gitlist.dev/e/18355.33363.669732.192506%40cargo.ozlabs.ibm.com
In-Reply-To: <47B31A72.7020502@viscovery.net>

```
Johannes Sixt writes:

> 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.

Thanks, applied.

Paul.

```
