mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 21:55:38 +00:00
use --follow-tags instead of --tags when pushing
fixes #70081 fixes #75240
This commit is contained in:
parent
8af1f7ebe8
commit
4a3c056e9a
|
@ -319,12 +319,12 @@
|
|||
},
|
||||
{
|
||||
"command": "git.pushWithTags",
|
||||
"title": "%command.pushWithTags%",
|
||||
"title": "%command.pushFollowTags%",
|
||||
"category": "Git"
|
||||
},
|
||||
{
|
||||
"command": "git.pushWithTagsForce",
|
||||
"title": "%command.pushWithTagsForce%",
|
||||
"title": "%command.pushFollowTagsForce%",
|
||||
"category": "Git"
|
||||
},
|
||||
{
|
||||
|
|
|
@ -47,8 +47,8 @@
|
|||
"command.pushForce": "Push (Force)",
|
||||
"command.pushTo": "Push to...",
|
||||
"command.pushToForce": "Push to... (Force)",
|
||||
"command.pushWithTags": "Push With Tags",
|
||||
"command.pushWithTagsForce": "Push With Tags (Force)",
|
||||
"command.pushWithTags": "Push (Follow Tags)",
|
||||
"command.pushWithTagsForce": "Push (Follow Tags, Force)",
|
||||
"command.addRemote": "Add Remote",
|
||||
"command.removeRemote": "Remove Remote",
|
||||
"command.sync": "Sync",
|
||||
|
|
|
@ -202,7 +202,7 @@ function createCheckoutItems(repository: Repository): CheckoutItem[] {
|
|||
enum PushType {
|
||||
Push,
|
||||
PushTo,
|
||||
PushTags,
|
||||
PushFollowTags,
|
||||
}
|
||||
|
||||
interface PushOptions {
|
||||
|
@ -1759,10 +1759,8 @@ export class CommandCenter {
|
|||
}
|
||||
}
|
||||
|
||||
if (pushOptions.pushType === PushType.PushTags) {
|
||||
await repository.pushTags(undefined, forcePushMode);
|
||||
|
||||
window.showInformationMessage(localize('push with tags success', "Successfully pushed with tags."));
|
||||
if (pushOptions.pushType === PushType.PushFollowTags) {
|
||||
await repository.pushFollowTags(undefined, forcePushMode);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1819,13 +1817,13 @@ export class CommandCenter {
|
|||
}
|
||||
|
||||
@command('git.pushWithTags', { repository: true })
|
||||
async pushWithTags(repository: Repository): Promise<void> {
|
||||
await this._push(repository, { pushType: PushType.PushTags });
|
||||
async pushFollowTags(repository: Repository): Promise<void> {
|
||||
await this._push(repository, { pushType: PushType.PushFollowTags });
|
||||
}
|
||||
|
||||
@command('git.pushWithTagsForce', { repository: true })
|
||||
async pushWithTagsForce(repository: Repository): Promise<void> {
|
||||
await this._push(repository, { pushType: PushType.PushTags, forcePush: true });
|
||||
async pushFollowTagsForce(repository: Repository): Promise<void> {
|
||||
await this._push(repository, { pushType: PushType.PushFollowTags, forcePush: true });
|
||||
}
|
||||
|
||||
@command('git.pushTo', { repository: true })
|
||||
|
|
|
@ -1425,7 +1425,7 @@ export class Repository {
|
|||
}
|
||||
|
||||
if (tags) {
|
||||
args.push('--tags');
|
||||
args.push('--follow-tags');
|
||||
}
|
||||
|
||||
if (remote) {
|
||||
|
|
|
@ -1013,7 +1013,7 @@ export class Repository implements Disposable {
|
|||
await this.run(Operation.Push, () => this.repository.push(remote, name, setUpstream, undefined, forcePushMode));
|
||||
}
|
||||
|
||||
async pushTags(remote?: string, forcePushMode?: ForcePushMode): Promise<void> {
|
||||
async pushFollowTags(remote?: string, forcePushMode?: ForcePushMode): Promise<void> {
|
||||
await this.run(Operation.Push, () => this.repository.push(remote, undefined, false, true, forcePushMode));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue