From d250ca4947448bc90a537fcec9954ce5af98a216 Mon Sep 17 00:00:00 2001 From: Andre Sencioles Date: Wed, 30 Aug 2017 21:47:15 +1200 Subject: Fix #1001: Use git show instead of git diff for reporting changes When running aginst a new repo, OX_REPO_COMMITREF points to the initial commit and OX_REPO_COMMITREF~1 is invalid. Git diff fails with error: unknown revision or path not in the working tree --- extra/oxidized-report-git-commits | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extra/oxidized-report-git-commits b/extra/oxidized-report-git-commits index db36ecf..193e2cd 100755 --- a/extra/oxidized-report-git-commits +++ b/extra/oxidized-report-git-commits @@ -58,4 +58,4 @@ echo "Git repo: ${OX_REPO_NAME}" echo "Git commit ID: ${OX_REPO_COMMITREF}" echo "" -git --bare --git-dir="${OX_REPO_NAME}" diff --no-color "${OX_REPO_COMMITREF}~1..${OX_REPO_COMMITREF}" +git --bare --git-dir="${OX_REPO_NAME}" show --pretty='' --no-color "${OX_REPO_COMMITREF}" -- cgit v1.2.1