We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d4ca525 commit 1de4005Copy full SHA for 1de4005
src/count-commits-per-file.ts
@@ -53,10 +53,18 @@ function assertIsGitRootDirectory(directory: string): void {
53
}
54
55
function buildCommand(directory, { firstParent, since }): string {
56
- const firstParentFlag = firstParent ? "--first-parent" : "";
57
- const sinceParameter = since ? `--since="${since}"` : "";
58
return [
59
- `git -C ${directory} log ${sinceParameter} ${firstParentFlag} --name-only --format='' '*.[tj]s'`,
+ [
+ "git",
+ `-C ${directory}`,
60
+ `log`,
61
+ `--follow`,
62
+ `--name-only`,
63
+ `--format=''`,
64
+ since ? `--since="${since}"` : "",
65
+ firstParent ? "--first-parent" : "",
66
+ "'*.[tj]s'"
67
+ ].join(" "),
68
"sort",
69
"uniq --count"
70
].join(" | ");
0 commit comments