Skip to content

Commit

Permalink
Merge pull request #32 from J-Fields/exclude-deleted-files
Browse files Browse the repository at this point in the history
Exclude deleted files when using `only_changed`
  • Loading branch information
creyD authored Dec 17, 2020
2 parents b0b067f + ce4e1eb commit bb361e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ if _git_changed; then
_git_setup

if $INPUT_ONLY_CHANGED; then
for file in $(git diff --name-only HEAD^..HEAD)
# --diff-filter=d excludes deleted files
for file in $(git diff --name-only --diff-filter=d HEAD^..HEAD)
do
git add $file
done
Expand Down

0 comments on commit bb361e2

Please sign in to comment.