Skip to content

Commit

Permalink
Fixes invalid date parsing in rewrite-history
Browse files Browse the repository at this point in the history
  • Loading branch information
conradkleinespel committed Sep 21, 2024
1 parent 5382295 commit 8e822c2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/git.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class LogEntry {
async function getLogShaAndDates() {
const result = await spawnAsync("git", [
"log",
"--pretty=format:%H %aI %I",
"--pretty=format:%H %aI %cI",
"--reverse",
]);

Expand Down
4 changes: 4 additions & 0 deletions src/git.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,10 @@ describe("git function tests", () => {
]);
expect(logEntries.map((l) => l.authorDate.day)).toEqual([1, 3]);
expect(logEntries.map((l) => l.commitDate.day)).toEqual([2, 4]);
expect(spawnAsync.mock.calls[0]).toEqual([
"git",
["log", "--pretty=format:%H %aI %cI", "--reverse"],
]);
});
});

Expand Down

0 comments on commit 8e822c2

Please sign in to comment.