Skip to content

Commit

Permalink
chore(helpers): Pass explicit diff prefixes to avoid localized variat…
Browse files Browse the repository at this point in the history
…ion in snapshots
  • Loading branch information
evocateur committed Aug 15, 2018
1 parent f2c470a commit 3cbeeab
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion helpers/show-commit/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,20 @@ module.exports = showCommit;

function showCommit(cwd, ...args) {
return execa
.stdout("git", ["show", "--unified=0", "--ignore-space-at-eol", "--pretty=%B%+D", ...args], { cwd })
.stdout(
"git",
[
"show",
"--unified=0",
"--ignore-space-at-eol",
"--pretty=%B%+D",
// make absolutely certain that no OS localization
// changes the expected value of the path prefixes
"--src-prefix=a/",
"--dst-prefix=b/",
...args,
],
{ cwd }
)
.then(stdout => gitSHA.serialize(stdout));
}

0 comments on commit 3cbeeab

Please sign in to comment.