Skip to content

Commit

Permalink
Remove quotes from git log format
Browse files Browse the repository at this point in the history
  • Loading branch information
lo1tuma committed Sep 25, 2023
1 parent 4089a8c commit fb85723
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions source/lib/git-command-runner.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,7 @@ test('getMergeCommitLogs() executes "git log" with the correct options', async (
await runner.getMergeCommitLogs('foo');

t.is(execute.callCount, 1);
t.deepEqual(execute.firstCall.args, [
'git log --no-color --pretty=format:"%s__||__%b##$$@@$$##" --merges foo..HEAD'
]);
t.deepEqual(execute.firstCall.args, ['git log --no-color --pretty=format:%s__||__%b##$$@@$$## --merges foo..HEAD']);
});

test('getMergeCommitLogs() returns the parsed command output', async (t) => {
Expand Down
2 changes: 1 addition & 1 deletion source/lib/git-command-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export function createGitCommandRunner(dependencies: GitCommandRunnerDependencie
const fields = [subjectPlaceholder, bodyPlaceholder];
const format = `${fields.join(fieldSeperator)}${lineSeperator}`;

const result = await execute(`git log --no-color --pretty=format:"${format}" --merges ${from}..HEAD`);
const result = await execute(`git log --no-color --pretty=format:${format} --merges ${from}..HEAD`);

const logs = splitLines(result.stdout, lineSeperator);
return logs.map((log) => {
Expand Down

0 comments on commit fb85723

Please sign in to comment.