Closed thombergs closed 7 years ago
I deleted the field oldHead and create a JSON-File to store the state of the local repository. The JSON-File hold the Commit Informations like the Name and the Email of the Commiter, the Time of the Commit and the Commit-ID.
Due to this Information the Application can get the Head of the latest Commit and look for Updates in the Repository. Jekyll2cms compares the state of the JSON-File with the Information of the Pull. If both have different Information then the Repository need to be updated else there is no update available.
The static field HEAD was deleted too.
Currently, the
RepoService
has a fieldoldHead
which stores the old Head of the local repository. A Service shouldn't hold state like this. If the application restarts, the state is lost, what happens then?Instead, the application should store the commit id or commit date of the latest commit in a file and push that file into the repository. Then, when the repo is updated, it could access the old state by reading this file.