Remove incorrect reversal of targetHistory
This commit is contained in:
parent
05aa726283
commit
74290d2101
4
dist/index.js
vendored
4
dist/index.js
vendored
@ -25830,7 +25830,7 @@ async function main(sourceRepo, targetRepo, dryRun, tokenForTargetRepo) {
|
||||
// compared), albeit approximately-halved - but I'm gambling on the fact that that should still take
|
||||
// negligible practical time at usual repo sizes - at least, the ones I'm
|
||||
// this quadratic portion should be negligible, though - and, even if it isn't, it definitely will
|
||||
targetCommitHistory = buildTargetCommitHistory(TARGET_DIR, sourceCommit.date).reverse();
|
||||
targetCommitHistory = buildTargetCommitHistory(TARGET_DIR, sourceCommit.date);
|
||||
}
|
||||
}
|
||||
console.log(`DEBUG - targetCommit: ${targetCommit.hash}`);
|
||||
@ -25874,7 +25874,7 @@ function buildTargetCommitHistory(path, oldestDateInSourceCommitHistory) {
|
||||
try {
|
||||
const countingLogOutput = (0, child_process_1.execSync)(`git log --since=${oldestDateInSourceCommitHistory.toISOString()} --pretty=oneline`, { cwd: path });
|
||||
const countedNumber = countingLogOutput.toString().split('\n').length;
|
||||
console.log(`DEBUG - countedNumber: ${countedNumber}`);
|
||||
console.log(`DEBUG - countedNumber (how many commits in target repo since oldest source commit) is: ${countedNumber}`);
|
||||
const logOutput = (0, child_process_1.execSync)(`git log --max-count=${countedNumber + 1} --pretty=format:'{\"hash\":\"%h\",\"author_name\":\"%an\",\"author_email\":\"%ae\",\"date\":\"%ai\",\"message\":\"%s\",\"parentHashes\":\"%p\"}'`, { cwd: path });
|
||||
const logLines = logOutput.toString().split('\n');
|
||||
for (const line of logLines) {
|
||||
|
BIN
node_modules/@vercel/ncc/dist/ncc/cli.js.cache
generated
vendored
BIN
node_modules/@vercel/ncc/dist/ncc/cli.js.cache
generated
vendored
Binary file not shown.
BIN
node_modules/@vercel/ncc/dist/ncc/index.js.cache
generated
vendored
BIN
node_modules/@vercel/ncc/dist/ncc/index.js.cache
generated
vendored
Binary file not shown.
BIN
node_modules/@vercel/ncc/dist/ncc/loaders/relocate-loader.js.cache
generated
vendored
BIN
node_modules/@vercel/ncc/dist/ncc/loaders/relocate-loader.js.cache
generated
vendored
Binary file not shown.
BIN
node_modules/@vercel/ncc/dist/ncc/loaders/shebang-loader.js.cache
generated
vendored
BIN
node_modules/@vercel/ncc/dist/ncc/loaders/shebang-loader.js.cache
generated
vendored
Binary file not shown.
BIN
node_modules/@vercel/ncc/dist/ncc/loaders/ts-loader.js.cache
generated
vendored
BIN
node_modules/@vercel/ncc/dist/ncc/loaders/ts-loader.js.cache
generated
vendored
Binary file not shown.
10
run.sh
10
run.sh
@ -6,11 +6,17 @@
|
||||
# would be my natural preference
|
||||
rm -rf working
|
||||
|
||||
if [[ -z "$TOKEN" ]]; then
|
||||
echo "TOKEN is not set"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
INPUT_SOURCE_REPO_DOMAIN="gitea.scubbo.org" \
|
||||
INPUT_SOURCE_REPO_OWNER="scubbo" \
|
||||
INPUT_SOURCE_REPO_NAME="commit-report-sync" \
|
||||
INPUT_TARGET_REPO_DOMAIN="gitea.scubbo.org" \
|
||||
INPUT_TARGET_REPO_DOMAIN="github.com" \
|
||||
INPUT_TARGET_REPO_OWNER="scubbo" \
|
||||
INPUT_TARGET_REPO_NAME="commit-report-sync-testbed-destination" \
|
||||
INPUT_TARGET_REPO_NAME="gitea-commit-mirror" \
|
||||
INPUT_DRY_RUN="false" \
|
||||
INPUT_TOKEN_FOR_TARGET_REPO="$TOKEN" \
|
||||
npx ts-node src/index.ts
|
@ -103,7 +103,7 @@ export async function main(sourceRepo: Repo, targetRepo: Repo, dryRun: boolean,
|
||||
// compared), albeit approximately-halved - but I'm gambling on the fact that that should still take
|
||||
// negligible practical time at usual repo sizes - at least, the ones I'm
|
||||
// this quadratic portion should be negligible, though - and, even if it isn't, it definitely will
|
||||
targetCommitHistory = buildTargetCommitHistory(TARGET_DIR, sourceCommit.date).reverse();
|
||||
targetCommitHistory = buildTargetCommitHistory(TARGET_DIR, sourceCommit.date);
|
||||
}
|
||||
}
|
||||
console.log(`DEBUG - targetCommit: ${targetCommit.hash}`);
|
||||
@ -158,7 +158,7 @@ export function buildTargetCommitHistory(path: string, oldestDateInSourceCommitH
|
||||
{ cwd: path }
|
||||
);
|
||||
const countedNumber = countingLogOutput.toString().split('\n').length;
|
||||
console.log(`DEBUG - countedNumber: ${countedNumber}`);
|
||||
console.log(`DEBUG - countedNumber (how many commits in target repo since oldest source commit) is: ${countedNumber}`);
|
||||
const logOutput = execSync(
|
||||
`git log --max-count=${countedNumber+1} --pretty=format:'{\"hash\":\"%h\",\"author_name\":\"%an\",\"author_email\":\"%ae\",\"date\":\"%ai\",\"message\":\"%s\",\"parentHashes\":\"%p\"}'`,
|
||||
{ cwd: path }
|
||||
|
Loading…
x
Reference in New Issue
Block a user