SCP: Add git commit time support for older git versions
This commit is contained in:
parent
6bfad051a8
commit
b0ff29781b
3 changed files with 6 additions and 3 deletions
|
@ -2,5 +2,6 @@
|
||||||
#
|
#
|
||||||
# A hook script that is called after a successful
|
# A hook script that is called after a successful
|
||||||
# checkout to record the commit-id in the working directory.
|
# 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
|
||||||
|
|
||||||
|
|
|
@ -2,4 +2,5 @@
|
||||||
#
|
#
|
||||||
# A hook script that is called after a successful
|
# A hook script that is called after a successful
|
||||||
# commit is made to record the commit-id in the working directory.
|
# 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
|
||||||
|
|
|
@ -2,5 +2,6 @@
|
||||||
#
|
#
|
||||||
# A hook script that is called after a successful merge
|
# A hook script that is called after a successful merge
|
||||||
# to record the commit-id in the working directory.
|
# 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
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue