Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/local-actions/branch-manager/main.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion ng-dev/release/publish/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ export abstract class ReleaseAction {

/** Checks out an upstream branch with a detached head. */
protected async checkoutUpstreamBranch(branchName: string) {
this.git.run(['fetch', '-q', this.git.getRepoGitUrl(), branchName]);
this.git.run(['fetch', '-q', this.git.getRepoGitUrl(), '--', branchName]);
this.git.run(['checkout', '-q', 'FETCH_HEAD', '--detach']);
}

Expand Down Expand Up @@ -480,6 +480,7 @@ export abstract class ReleaseAction {
'fetch',
'--force',
this.git.getRepoGitUrl(),
'--',
`refs/tags/${releaseNotesCompareTag}:refs/tags/${releaseNotesCompareTag}`,
]);

Expand Down
2 changes: 1 addition & 1 deletion ng-dev/utils/g3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export class G3Stats {
}

// Retrieve the latest ref for the branch and return its sha.
git.runGraceful(['fetch', '-q', git.getRepoGitUrl(), branch]);
git.runGraceful(['fetch', '-q', git.getRepoGitUrl(), '--', branch]);
return git.runGraceful(['rev-parse', 'FETCH_HEAD']).stdout.trim();
}

Expand Down
3 changes: 2 additions & 1 deletion ng-dev/utils/testing/virtual-git-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ export class VirtualGitClient extends AuthenticatedGitClient {

/** Handler for the `git fetch` command. */
private _fetch(rawArgs: string[]) {
const {force, refspec, repoUrl} = yargs(rawArgs)
const cleanArgs = rawArgs.filter((arg) => arg !== '--');
const {force, refspec, repoUrl} = yargs(cleanArgs)
.command('$0 <repoUrl> <refspec>', false)
.positional('repoUrl', {type: 'string', demandOption: true})
.positional('refspec', {type: 'string', demandOption: true})
Expand Down