Skip to content

Commit

Permalink
bug(gitDiff): fix git diff by removing --quiet
Browse files Browse the repository at this point in the history
due to it doesn't return any string
  • Loading branch information
kittisakLS committed Oct 26, 2023
1 parent 1c0173f commit b3c0fb0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/utils/git.services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,11 @@ export class GitService {
* @returns A string of information taken from git diff details.
*/
getDiffDetails(commitHash: string) {
const existParent = this.executeCommand(
`git rev-parse --quiet ${commitHash}^@`
);
const existParent = this.executeCommand(`git rev-parse ${commitHash}^@`);
if (!existParent) {
return null;
}
return this.executeCommand(`git diff --quiet ${commitHash}~ ${commitHash}`);
return this.executeCommand(`git diff ${commitHash}~ ${commitHash}`);
}

/**
Expand Down

0 comments on commit b3c0fb0

Please sign in to comment.