summaryrefslogtreecommitdiff
path: root/src/lib/git
diff options
context:
space:
mode:
authorJoão Augusto Costa Branco Marado Torres <torres.dev@disroot.org>2025-06-28 18:14:22 -0300
committerJoão Augusto Costa Branco Marado Torres <torres.dev@disroot.org>2025-06-28 18:14:22 -0300
commit79fd506d30eef3d113f4a8e3ab9ebd9004f1e8cc (patch)
tree96ff57c92e897c3cc3331e23043d20f1665c7d0a /src/lib/git
parenta1eac976b20e39f86d5944fbec68e2a0f8ffb746 (diff)
feat: index page
Signed-off-by: João Augusto Costa Branco Marado Torres <torres.dev@disroot.org>
Diffstat (limited to 'src/lib/git')
-rw-r--r--src/lib/git/log.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/git/log.ts b/src/lib/git/log.ts
index 86bbe7b..bcf6888 100644
--- a/src/lib/git/log.ts
+++ b/src/lib/git/log.ts
@@ -29,6 +29,7 @@ export async function getLastCommitForOneOfFiles(
"-1",
`--pretty=format:${format.map((x) => `%${x}`).join("%n")}`,
"--",
+ // deno-lint-ignore no-undef
...Iterator.from(files).map((x) => x.pathname),
],
});
@@ -59,6 +60,7 @@ export async function getLastCommitForOneOfFiles(
const raw = rawLines.join("\n").trim();
const commit: Commit = {
+ // deno-lint-ignore no-undef
files: await fileStatusFromCommit(hash, Iterator.from(files)),
hash: { long: hash, short: abbrHash },
author: {
@@ -112,6 +114,7 @@ async function fileStatusFromCommit(
return result.map((line) => {
const [status, path] = line.split("\t");
if (
+ // deno-lint-ignore no-undef
Iterator.from(files).some((file) =>
file.pathname.replace(dir.pathname, "").includes(path)
)