diff --git a/src/GitRepository.php b/src/GitRepository.php index 2ef6f83..504c92a 100644 --- a/src/GitRepository.php +++ b/src/GitRepository.php @@ -557,6 +557,16 @@ public function setRemoteUrl($name, $url, array $options = NULL) return $this; } + /** + * Get last edit datetime for a path + * @param $path + * @return string returns output + * @throws GitException + */ + public function getPathLastEdit($path) { + return $this->execute("log", ["-1", "--pretty=format:%ci", $path]); + } + /** * @param mixed ...$cmd