From b0ff29781b2e6f526f6f36602590fcd91adc0c95 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Thu, 29 Mar 2018 21:12:44 -0700 Subject: [PATCH] SCP: Add git commit time support for older git versions --- Visual Studio Projects/git-hooks/post-checkout | 3 ++- Visual Studio Projects/git-hooks/post-commit | 3 ++- Visual Studio Projects/git-hooks/post-merge | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Visual Studio Projects/git-hooks/post-checkout b/Visual Studio Projects/git-hooks/post-checkout index c9236188..6b0fdb62 100755 --- a/Visual Studio Projects/git-hooks/post-checkout +++ b/Visual Studio Projects/git-hooks/post-checkout @@ -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 diff --git a/Visual Studio Projects/git-hooks/post-commit b/Visual Studio Projects/git-hooks/post-commit index 7f88dce1..b3ee1268 100755 --- a/Visual Studio Projects/git-hooks/post-commit +++ b/Visual Studio Projects/git-hooks/post-commit @@ -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 diff --git a/Visual Studio Projects/git-hooks/post-merge b/Visual Studio Projects/git-hooks/post-merge index f8406fc7..3a383810 100755 --- a/Visual Studio Projects/git-hooks/post-merge +++ b/Visual Studio Projects/git-hooks/post-merge @@ -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