threads / patch / 12074

patchgitk: Heed the lines of context in merge commits.

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

## tl;dr

2 messages between Feb 13, 2008 and Feb 13, 2008. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

Johannes Sixt· Feb 13, 2008, 16:27 UTC · lore
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(-)
Show changes to gitk +2 −1
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· Feb 13, 2008, 23:50 UTC · re: Johannes Sixt · lore

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

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.

← back to recent threads