diff options
author | Andre Sencioles <asenci@gmail.com> | 2017-08-30 21:47:15 +1200 |
---|---|---|
committer | Andre Sencioles <asenci@gmail.com> | 2017-08-30 21:47:15 +1200 |
commit | d250ca4947448bc90a537fcec9954ce5af98a216 (patch) | |
tree | edf71a40350c9d883a6490729f3b07acabcd65a7 | |
parent | a4174019e55992182a357573022a8ce024284bf7 (diff) |
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
-rwxr-xr-x | extra/oxidized-report-git-commits | 2 |
1 files changed, 1 insertions, 1 deletions
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}" |