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
|
// 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
|
// 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
|
// 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}`);
|
console.log(`DEBUG - targetCommit: ${targetCommit.hash}`);
|
||||||
@ -25874,7 +25874,7 @@ function buildTargetCommitHistory(path, oldestDateInSourceCommitHistory) {
|
|||||||
try {
|
try {
|
||||||
const countingLogOutput = (0, child_process_1.execSync)(`git log --since=${oldestDateInSourceCommitHistory.toISOString()} --pretty=oneline`, { cwd: path });
|
const countingLogOutput = (0, child_process_1.execSync)(`git log --since=${oldestDateInSourceCommitHistory.toISOString()} --pretty=oneline`, { cwd: path });
|
||||||
const countedNumber = countingLogOutput.toString().split('\n').length;
|
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 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');
|
const logLines = logOutput.toString().split('\n');
|
||||||
for (const line of logLines) {
|
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
|
# would be my natural preference
|
||||||
rm -rf working
|
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_DOMAIN="gitea.scubbo.org" \
|
||||||
INPUT_SOURCE_REPO_OWNER="scubbo" \
|
INPUT_SOURCE_REPO_OWNER="scubbo" \
|
||||||
INPUT_SOURCE_REPO_NAME="commit-report-sync" \
|
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_OWNER="scubbo" \
|
||||||
INPUT_TARGET_REPO_NAME="commit-report-sync-testbed-destination" \
|
INPUT_TARGET_REPO_NAME="gitea-commit-mirror" \
|
||||||
INPUT_DRY_RUN="false" \
|
INPUT_DRY_RUN="false" \
|
||||||
|
INPUT_TOKEN_FOR_TARGET_REPO="$TOKEN" \
|
||||||
npx ts-node src/index.ts
|
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
|
// 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
|
// 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
|
// 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}`);
|
console.log(`DEBUG - targetCommit: ${targetCommit.hash}`);
|
||||||
@ -158,7 +158,7 @@ export function buildTargetCommitHistory(path: string, oldestDateInSourceCommitH
|
|||||||
{ cwd: path }
|
{ cwd: path }
|
||||||
);
|
);
|
||||||
const countedNumber = countingLogOutput.toString().split('\n').length;
|
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(
|
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\"}'`,
|
`git log --max-count=${countedNumber+1} --pretty=format:'{\"hash\":\"%h\",\"author_name\":\"%an\",\"author_email\":\"%ae\",\"date\":\"%ai\",\"message\":\"%s\",\"parentHashes\":\"%p\"}'`,
|
||||||
{ cwd: path }
|
{ cwd: path }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user