Another bugfix to clone (#4)

Reviewed-on: #4
Co-authored-by: Jack Jackson <scubbojj@gmail.com>
Co-committed-by: Jack Jackson <scubbojj@gmail.com>
This commit is contained in:
Jack Jackson 2025-03-06 01:58:21 +00:00 committed by scubbo
parent 9735b49e43
commit 60d55e0204
7 changed files with 8 additions and 2 deletions

5
dist/index.js vendored
View File

@ -25659,7 +25659,10 @@ const child_process_1 = __nccwpck_require__(5317);
const fs_1 = __nccwpck_require__(9896);
const date_fns_1 = __nccwpck_require__(4367);
function gitClone(dir, url) {
(0, child_process_1.execSync)(`git clone ${url}`, { cwd: dir });
// Note - intentionally, this is not `execSync(..., { cwd: dir })` - because that will cause the repo to get
// cloned into `<dir>/<repo_name>`. We _could_ just pass the "working directory" as the `cwd` argument, but it's
// more direct to simply specify the path we want it cloned into.
(0, child_process_1.execSync)(`git clone ${url} ${dir}`);
}
function getNLatestCommits(dir, n) {
const logOutput = (0, child_process_1.execSync)(

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -6,7 +6,10 @@ import { mkdirSync } from "fs";
import { format } from 'date-fns';
export function gitClone(dir: string, url: string) {
execSync(`git clone ${url}`, { cwd: dir });
// Note - intentionally, this is not `execSync(..., { cwd: dir })` - because that will cause the repo to get
// cloned into `<dir>/<repo_name>`. We _could_ just pass the "working directory" as the `cwd` argument, but it's
// more direct to simply specify the path we want it cloned into.
execSync(`git clone ${url} ${dir}`);
}
export function getNLatestCommits(dir: string, n: number): Commit[] {