SCP: Add git commit time support for older git versions

This commit is contained in:
Mark Pizzolato 2018-03-29 21:12:44 -07:00
parent 6bfad051a8
commit b0ff29781b
3 changed files with 6 additions and 3 deletions

View file

@ -2,5 +2,6 @@
#
# A hook script that is called after a successful
# checkout to record the commit-id in the working directory.
git log -1 --pretty="SIM_GIT_COMMIT_ID %H%nSIM_GIT_COMMIT_TIME %aI" >.git-commit-id
isodate=$(git log -1 --pretty="%ai"|sed -e 's/ /T/'|sed -e 's/ //')
git log -1 --pretty="SIM_GIT_COMMIT_ID %H%nSIM_GIT_COMMIT_TIME $isodate" >.git-commit-id

View file

@ -2,4 +2,5 @@
#
# A hook script that is called after a successful
# commit is made to record the commit-id in the working directory.
git log -1 --pretty="SIM_GIT_COMMIT_ID %H%nSIM_GIT_COMMIT_TIME %aI" >.git-commit-id
isodate=$(git log -1 --pretty="%ai"|sed -e 's/ /T/'|sed -e 's/ //')
git log -1 --pretty="SIM_GIT_COMMIT_ID %H%nSIM_GIT_COMMIT_TIME $isodate" >.git-commit-id

View file

@ -2,5 +2,6 @@
#
# A hook script that is called after a successful merge
# to record the commit-id in the working directory.
git log -1 --pretty="SIM_GIT_COMMIT_ID %H%nSIM_GIT_COMMIT_TIME %aI" >.git-commit-id
isodate=$(git log -1 --pretty="%ai"|sed -e 's/ /T/'|sed -e 's/ //')
git log -1 --pretty="SIM_GIT_COMMIT_ID %H%nSIM_GIT_COMMIT_TIME $isodate" >.git-commit-id