提交 4a3c056e 编写于 作者: J Joao Moreno

use --follow-tags instead of --tags when pushing

fixes #70081
fixes #75240
上级 8af1f7eb
......@@ -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));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册