Skip to content

Commit

Permalink
Support customizing the git diff, typically with the '--color-words' …
Browse files Browse the repository at this point in the history
…option, relevant for go.{mod,sum} diffs
  • Loading branch information
bgandon committed Nov 8, 2023
1 parent 0097bca commit 898bb28
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tasks/git/commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ find "repo" -mindepth 1 -maxdepth 1 -print0 \
pushd "repo-committed" > /dev/null
git config "color.ui" "always"
git status
git diff | cat
git diff ${GIT_DIFF_OPTS} | cat

git config "user.name" "${GIT_COMMIT_NAME}"
git config "user.email" "${GIT_COMMIT_EMAIL}"
Expand Down
3 changes: 3 additions & 0 deletions tasks/git/commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ params:
GIT_COMMIT_NAME:
GIT_COMMIT_EMAIL:

GIT_DIFF_OPTS:
# Optional

GIT_COMMIT_MESSAGE:
# Optional
# One of 'commit-info' resource of 'GIT_COMMIT_MESSAGE' param must be
Expand Down

0 comments on commit 898bb28

Please sign in to comment.