Skip to content

Commit 4a3c056

Browse files
committed
use --follow-tags instead of --tags when pushing
fixes microsoft#70081 fixes microsoft#75240
1 parent 8af1f7e commit 4a3c056

5 files changed

Lines changed: 13 additions & 15 deletions

File tree

extensions/git/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,12 +319,12 @@
319319
},
320320
{
321321
"command": "git.pushWithTags",
322-
"title": "%command.pushWithTags%",
322+
"title": "%command.pushFollowTags%",
323323
"category": "Git"
324324
},
325325
{
326326
"command": "git.pushWithTagsForce",
327-
"title": "%command.pushWithTagsForce%",
327+
"title": "%command.pushFollowTagsForce%",
328328
"category": "Git"
329329
},
330330
{

extensions/git/package.nls.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@
4747
"command.pushForce": "Push (Force)",
4848
"command.pushTo": "Push to...",
4949
"command.pushToForce": "Push to... (Force)",
50-
"command.pushWithTags": "Push With Tags",
51-
"command.pushWithTagsForce": "Push With Tags (Force)",
50+
"command.pushWithTags": "Push (Follow Tags)",
51+
"command.pushWithTagsForce": "Push (Follow Tags, Force)",
5252
"command.addRemote": "Add Remote",
5353
"command.removeRemote": "Remove Remote",
5454
"command.sync": "Sync",

extensions/git/src/commands.ts

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ function createCheckoutItems(repository: Repository): CheckoutItem[] {
202202
enum PushType {
203203
Push,
204204
PushTo,
205-
PushTags,
205+
PushFollowTags,
206206
}
207207

208208
interface PushOptions {
@@ -1759,10 +1759,8 @@ export class CommandCenter {
17591759
}
17601760
}
17611761

1762-
if (pushOptions.pushType === PushType.PushTags) {
1763-
await repository.pushTags(undefined, forcePushMode);
1764-
1765-
window.showInformationMessage(localize('push with tags success', "Successfully pushed with tags."));
1762+
if (pushOptions.pushType === PushType.PushFollowTags) {
1763+
await repository.pushFollowTags(undefined, forcePushMode);
17661764
return;
17671765
}
17681766

@@ -1819,13 +1817,13 @@ export class CommandCenter {
18191817
}
18201818

18211819
@command('git.pushWithTags', { repository: true })
1822-
async pushWithTags(repository: Repository): Promise<void> {
1823-
await this._push(repository, { pushType: PushType.PushTags });
1820+
async pushFollowTags(repository: Repository): Promise<void> {
1821+
await this._push(repository, { pushType: PushType.PushFollowTags });
18241822
}
18251823

18261824
@command('git.pushWithTagsForce', { repository: true })
1827-
async pushWithTagsForce(repository: Repository): Promise<void> {
1828-
await this._push(repository, { pushType: PushType.PushTags, forcePush: true });
1825+
async pushFollowTagsForce(repository: Repository): Promise<void> {
1826+
await this._push(repository, { pushType: PushType.PushFollowTags, forcePush: true });
18291827
}
18301828

18311829
@command('git.pushTo', { repository: true })

extensions/git/src/git.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1425,7 +1425,7 @@ export class Repository {
14251425
}
14261426

14271427
if (tags) {
1428-
args.push('--tags');
1428+
args.push('--follow-tags');
14291429
}
14301430

14311431
if (remote) {

extensions/git/src/repository.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1013,7 +1013,7 @@ export class Repository implements Disposable {
10131013
await this.run(Operation.Push, () => this.repository.push(remote, name, setUpstream, undefined, forcePushMode));
10141014
}
10151015

1016-
async pushTags(remote?: string, forcePushMode?: ForcePushMode): Promise<void> {
1016+
async pushFollowTags(remote?: string, forcePushMode?: ForcePushMode): Promise<void> {
10171017
await this.run(Operation.Push, () => this.repository.push(remote, undefined, false, true, forcePushMode));
10181018
}
10191019

0 commit comments

Comments
 (0)