Skip to content

Commit

Permalink
Added some more PureGitExtendedFileAnalysis gtViews
Browse files Browse the repository at this point in the history
  • Loading branch information
svenvc committed Oct 31, 2024
1 parent ceda118 commit 8b831b7
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions src/GToolkit4Git/PureGitExtendedFileAnalysis.extension.st
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
Extension { #name : #PureGitExtendedFileAnalysis }

{ #category : #'*GToolkit4Git' }
PureGitExtendedFileAnalysis >> gtViewBlameFor: composite [
<gtView>
^ composite forward
title: 'Blame';
priority: 50;
object: [ self file ];
view: #gtBlameFor:
]

{ #category : #'*GToolkit4Git' }
PureGitExtendedFileAnalysis >> gtViewGraphFor: composite [
<gtView>
Expand All @@ -11,16 +21,15 @@ PureGitExtendedFileAnalysis >> gtViewGraphFor: composite [
^ composite columnedList
title: 'Graph';
priority: 40;
items: [ | commits |
commits := self commits toArray wait.
commits do: [ :each | | numberOfLines numberOfLinesChanged |
items: [
self commits do: [ :each | | numberOfLines numberOfLinesChanged |
numberOfLines := each numberOfLines.
numberOfLinesChanged := each numberOfLinesChanged abs.
min := min min: numberOfLines.
max := max max: numberOfLines.
maxChanged := maxChanged max: numberOfLinesChanged ].
scale := max reciprocal * 800.
commits ];
self commits ];
column: 'Commit'
stencil: [ :item | | width |
width := (item numberOfLinesChanged abs / maxChanged * 50) max: 10.
Expand Down

0 comments on commit 8b831b7

Please sign in to comment.