From 0ec80a9810c30d35c46e1b919d2bf68c83bd5e96 Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Mon, 4 Nov 2024 19:36:40 +0100 Subject: [PATCH] Added PureGitFile>>#logReverse --- src/Iceberg-Git-CLI/PureGitFile.class.st | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Iceberg-Git-CLI/PureGitFile.class.st b/src/Iceberg-Git-CLI/PureGitFile.class.st index 922b526..5d95cde 100644 --- a/src/Iceberg-Git-CLI/PureGitFile.class.st +++ b/src/Iceberg-Git-CLI/PureGitFile.class.st @@ -130,6 +130,18 @@ PureGitFile >> logPatchReverse [ yourself ] ] +{ #category : #accessing } +PureGitFile >> logReverse [ + | commits | + commits := self repository queries + log: { '--first-parent' . '--reverse' . 'HEAD' . '--' . self path }. + ^ commits collect: [ :each | + PureGitFileCommit new + copyFrom: each; + path: self path; + yourself ] +] + { #category : #accessing } PureGitFile >> parent [ ^ self repository resolveFileReference: self fileReference parent