Skip to content

Commit

Permalink
fix(diff): ensure --no-renames is used for branchcompare
Browse files Browse the repository at this point in the history
  • Loading branch information
azlam-abdulsalam committed Jan 9, 2024
1 parent c28e812 commit 8a59432
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/sfp-cli/src/core/package/diff/PackageDiffImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default class PackageDiffImpl {
if(this.diffOptions?.useBranchCompare)
{
const mergeBase = await git.raw(['merge-base', this.diffOptions.branch, this.diffOptions.baseBranch]);
modified_files = await git.diff(['--name-only', this.diffOptions.branch, mergeBase.trim()]);
modified_files = await git.diff(['--no-renames','--name-only', this.diffOptions.branch, mergeBase.trim()]);
}
else
{
Expand Down Expand Up @@ -112,7 +112,7 @@ export default class PackageDiffImpl {
if(this.diffOptions?.useBranchCompare)
{
const mergeBase = await git.raw(['merge-base', this.diffOptions.branch, this.diffOptions.baseBranch]);
let modified_files = await git.diff(['--name-only', this.diffOptions.branch, mergeBase.trim()]);
let modified_files = await git.diff(['--no-renames','--name-only', this.diffOptions.branch, mergeBase.trim()]);

// Check whether the package has been modified
for (let filename of modified_files) {
Expand Down

0 comments on commit 8a59432

Please sign in to comment.