Files changed (1)
+# This git-prime.sh script is meant to be run on a cron job. Its goal is to provide an auto-save feature for a git repository.
+# But it gets no hash back then you're on a clean branch and it grabs the HEAD hash and writes that out:
+# In both cases before it writes to the log it checks to see if that hash (or an equivalent hash obj with no differences) was just written. If so then it does not write anything to the log - nothing changed.
+# -- Here we simply make sure the two files gitPrime uses in a repository exist so the script doesn't give "file not found" errors.
message=$(date; echo " branch: $branchName -- stash object created by git-prime (DIRTY Working Directory)") ;
+# -- check whether the command 'git stash create' handed back a hash. If yes we might write it if git diff is 'true' (so to speak), but
+ # -- Here we are comparing the git diff of the current 'stash hash' with the last one that we wrote.
+ # -- if they are different then something changed and we record the new one to the gitPrime.log otherwise
+ # -- we know that 'git stash create' handed nothing back so we are on a clean working dir. So we skipped the stash stuff.
+ # -- We check to see if the current HEAD has has already been captured in the gitPrime.log. If it has not then we record it
message=$(date; echo " branch: $branchName -- HEAD hash captured by git-prime (CLEAN Working Directory)") ;