diff --git a/README.md b/README.md
index 777b6e86..826bff97 100644
--- a/README.md
+++ b/README.md
@@ -144,6 +144,7 @@ Support this project with a :star:
| since\_last\_remote\_commit | `boolean` | `false` | `false` | Use the last commit on the remote
branch as the `base_sha`
(Defaults to the last commit
on the target branch for Pull requests
or the previous commit
on the current branch
for push events).
NOTE: This requires
`fetch-depth: 0`
with `actions/checkout@v2` |
| use\_fork\_point | `boolean` | `false` | `false` | Finds best common ancestor
between two commits
to use in a three-way merge
as the `base_sha`
See: [git merge-base](https://git-scm.com/docs/git-merge-base#Documentation/git-merge-base.txt---fork-point).
NOTE: This pulls the entire commit history of the base branch |
| quotepath | `boolean` | `false` | `true` | Output filenames completely verbatim by setting this to `false` |
+| diff_relative | `boolean` | `false` | `` | Exclude changes outside the current directory and show pathnames relative to it. |
## Examples
diff --git a/action.yml b/action.yml
index 75abcb76..768f2112 100644
--- a/action.yml
+++ b/action.yml
@@ -70,6 +70,9 @@ inputs:
description: 'Output filenames completely verbatim by setting this to false'
default: 'true'
required: false
+ diff_relative:
+ description: 'Exclude changes outside the current directory and show pathnames relative to it'
+ required: false
outputs:
added_files:
@@ -203,6 +206,7 @@ runs:
INPUT_INCLUDE_ALL_OLD_NEW_RENAMED_FILES: ${{ inputs.include_all_old_new_renamed_files }}
INPUT_OLD_NEW_SEPARATOR: ${{ inputs.old_new_separator }}
INPUT_OLD_NEW_FILES_SEPARATOR: ${{ inputs.old_new_files_separator }}
+ INPUT_DIFF_RELATIVE: ${{ inputs.diff_relative }}
branding:
icon: file-text
diff --git a/entrypoint.sh b/entrypoint.sh
index a2e9c85e..48e29989 100755
--- a/entrypoint.sh
+++ b/entrypoint.sh
@@ -12,6 +12,10 @@ else
git config --global core.quotepath on
fi
+if [[ -n $INPUT_DIFF_RELATIVE ]]; then
+ git config --global diff.relative "$INPUT_DIFF_RELATIVE"
+fi
+
function get_diff() {
base="$1"
sha="$2"