Skip to contentSkip to conversation

gitk: Heed the lines of context in merge commits.

PATCH Applied Johannes Sixt 2 participants 2 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gitk: Heed the lines of context in merge commits.

From: Johannes Sixt <[email protected]>

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.

---
 gitk |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
gitk +2 -1
index 7a97cc8..b20fa81 100644
@@ -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)]
     }
Signature · 1 line
1.5.4.43.gbd39-dirty
#1 lore raw
Quoted 3 lines · Johannes Sixt

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.