touchifyapp / vsts-changed-files

Azure DevOps pipeline task to get changed files since last succeeded build
MIT License
12 stars 6 forks source link

Git log showing files that hasn't changed #27

Open junalmeida opened 2 years ago

junalmeida commented 2 years ago

Is it possible for you to change from git log to git diff-tree? Due to some merge back, git log show files that hasn't really changed (possible due to squash merges), and then creating false positives.

SomaticIT commented 2 years ago

It seems possible.

However, it is necessary to ensure that this will not impact existing users. Due to the lack of time and requests, I would suggest to try implement a PR and make some tests on your repositories.

As far as I know, you should be able to replace git log with: git diff-tree -m -1 -r --name-only --pretty=format: {commit-id}

But I'm not sure it will works in any situation.