summaryrefslogtreecommitdiffstats
path: root/modules/git/commit.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/git/commit.go')
-rw-r--r--modules/git/commit.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/git/commit.go b/modules/git/commit.go
index 85c9554bb5..dad67dada6 100644
--- a/modules/git/commit.go
+++ b/modules/git/commit.go
@@ -263,6 +263,11 @@ func (c *Commit) GetFilesChangedSinceCommit(pastCommit string) ([]string, error)
return c.repo.getFilesChanged(pastCommit, c.ID.String())
}
+// FileChangedSinceCommit Returns true if the file given has changed since the the past commit
+func (c *Commit) FileChangedSinceCommit(filename, pastCommit string) (bool, error) {
+ return c.repo.FileChangedBetweenCommits(filename, pastCommit, c.ID.String())
+}
+
// GetSubModules get all the sub modules of current revision git tree
func (c *Commit) GetSubModules() (*ObjectCache, error) {
if c.submoduleCache != nil {