Skip to content

Commit 7e775c1

Browse files
committed
SyncGithub: simplify first master_base push
1 parent c859f66 commit 7e775c1

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/app/SyncGithub.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,15 @@ async function run() {
7575

7676
const git_push_target_list: Array<string> = [];
7777

78-
for (const group of push_group_list) {
78+
for (let i = 0; i < push_group_list.length; i++) {
79+
const group = push_group_list[i];
7980
const last_commit = last(group.commits);
8081
invariant(last_commit, "last_commit must exist");
8182

8283
// push group in isolation if master_base is set
83-
if (group.master_base) {
84+
// for the first group (i > 0) we can skip this
85+
// since it'll be based off master anyway
86+
if (group.master_base && i > 0) {
8487
await push_master_group(group);
8588
continue;
8689
}

0 commit comments

Comments
 (0)