Skip to content
This repository was archived by the owner on Mar 24, 2026. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/workspace-tools/src/git/gitUtilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,10 @@ export function getCurrentHash(cwd: string) {
* Get the commit hash in which the file was first added.
*/
export function getFileAddedHash(filename: string, cwd: string) {
const results = git(["rev-list", "HEAD", filename], { cwd });
const results = git(["rev-list", "--max-count=1", "HEAD", filename], { cwd });

if (results.success) {
return results.stdout.trim().split("\n").slice(-1)[0];
return results.stdout.trim();
}

return undefined;
Expand Down
Loading