Skip to content

Commit 658ccb1

Browse files
committed
test: 测试
1 parent 0856270 commit 658ccb1

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

markdown/react19.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# React19qqqq
1+
# React19qqqq31231
22

33
4月25日,React官方宣布React19在NPM上推出,可以先行下载使用。
44
正好此博客也是NextJS搭建的,尝试一下React19带来哪些变化。

src/lib/git.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,17 @@ export function getLastGitUpdateTime(filePath: string): Date | null {
1919

2020
export function getFirstGitCommitTime(filePath: string): Date | null {
2121
try {
22-
const command = `git log --reverse -1 --format="%ai" -- "${filePath}"`;
22+
const command = `git log --reverse --format="%ai" -- "${filePath}"`;
2323
const stdout = execSync(command).toString().trim();
24+
console.log(stdout);
2425

2526
if (!stdout) {
2627
return null;
2728
}
2829

2930
return new Date(stdout);
3031
} catch (error) {
31-
console.error('Error fetching git first commit time:', error);
32+
console.error('Error fetching git commit time:', error);
3233

3334
return null;
3435
}

0 commit comments

Comments
 (0)