diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index b7ab34c9..3e675d0c 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -231,6 +231,16 @@ jobs:
echo "Your README.md has been modified ${{ steps.changed-files.outputs.modified_files }}."
shell:
bash
+ - name: Run changed-files with quotepath disabled
+ id: changed-files-quotepath
+ uses: ./
+ with:
+ quotepath: "false"
+ - name: Show output
+ run: |
+ echo '${{ toJSON(steps.changed-files-quotepath.outputs) }}'
+ shell:
+ bash
- name: Run changed-files with forward slash separator
id: changed-files-forward-slash
uses: ./
diff --git a/README.md b/README.md
index ebbd5e04..15497518 100644
--- a/README.md
+++ b/README.md
@@ -140,6 +140,7 @@ Support this project with a :star:
| path | `string` | `false` | | Relative path under
`GITHUB_WORKSPACE`
to the repository |
| since\_last\_remote\_commit | `string` | `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 | `string` | `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 | `string` | `false` | `true` | Output filenames completely verbatim by setting this to `false` |
## Example
diff --git a/action.yml b/action.yml
index a16cac79..4d0d0cc7 100644
--- a/action.yml
+++ b/action.yml
@@ -53,6 +53,10 @@ inputs:
description: 'Finds best common ancestor between two commits to use in a three-way merge as the base_sha'
default: 'false'
required: false
+ quotepath:
+ description: 'Output filenames completely verbatim by setting this to false'
+ default: 'true'
+ required: false
outputs:
added_files:
@@ -177,6 +181,7 @@ runs:
INPUT_CURRENT_SHA: ${{ steps.changed-files-diff-sha.outputs.current_sha }}
INPUT_TARGET_BRANCH: ${{ steps.changed-files-diff-sha.outputs.target_branch }}
INPUT_CURRENT_BRANCH: ${{ steps.changed-files-diff-sha.outputs.current_branch }}
+ INPUT_QUOTEPATH: ${{ inputs.quotepath }}
branding:
icon: file-text
diff --git a/entrypoint.sh b/entrypoint.sh
index 8b2100d8..26d783c5 100755
--- a/entrypoint.sh
+++ b/entrypoint.sh
@@ -6,6 +6,12 @@ INPUT_SEPARATOR="${INPUT_SEPARATOR//'%'/'%25'}"
INPUT_SEPARATOR="${INPUT_SEPARATOR//$'\n'/'%0A'}"
INPUT_SEPARATOR="${INPUT_SEPARATOR//$'\r'/'%0D'}"
+if [[ $INPUT_QUOTEPATH == "false" ]]; then
+ git config --global core.quotepath off
+else
+ git config --global core.quotepath on
+fi
+
function get_diff() {
base="$1"
sha="$2"
diff --git a/test/test-è.txt b/test/test-è.txt
new file mode 100644
index 00000000..6de7b8c6
--- /dev/null
+++ b/test/test-è.txt
@@ -0,0 +1 @@
+This is a test file.