History

Fixes 4762 - Content API for Creating, Updating, Deleting Files (#6314)

Richard Mahn committed 7 years ago

Commit 22628111 parent 059195b54 files · +4154 −563Browse files

Showing the changes to modules/git/commit.go (1 of 54 files). Show all

Unified · Split

modules/git/commit.go+5−0
@@ -263,6 +263,11 @@ func (c *Commit) GetFilesChangedSinceCommit(pastCommit string) ([]string, error) · 262 unmodified lines
263263 return c.repo.getFilesChanged(pastCommit, c.ID.String())
264264 }
265265
266+// FileChangedSinceCommit Returns true if the file given has changed since the the past commit
267+func (c *Commit) FileChangedSinceCommit(filename, pastCommit string) (bool, error) {
268+ return c.repo.FileChangedBetweenCommits(filename, pastCommit, c.ID.String())
269+}
270+
266271 // GetSubModules get all the sub modules of current revision git tree
267272 func (c *Commit) GetSubModules() (*ObjectCache, error) {
268273 if c.submoduleCache != nil {