mirror of
https://github.com/shumadrid/obsidian-git-changelog.git
synced 2026-07-22 05:42:16 +00:00
17 lines
308 B
TypeScript
17 lines
308 B
TypeScript
import type { SimpleGit } from 'simple-git';
|
|
|
|
export async function runHashObjectEmptyTree({
|
|
git
|
|
}: {
|
|
git: SimpleGit;
|
|
}): Promise<string> {
|
|
const emptyTreeHash = await git.raw([
|
|
'hash-object',
|
|
'-t',
|
|
'tree',
|
|
'/dev/null'
|
|
]);
|
|
|
|
// Trimming is required.
|
|
return emptyTreeHash.trim();
|
|
}
|