Browse Source

Removes prerelease/debugging flags from native git checks

main
Ramin Tadayon 1 year ago
parent
commit
9b276fcc41
No known key found for this signature in database GPG Key ID: 79D60DDE3DFB95F5
2 changed files with 4 additions and 7 deletions
  1. +1
    -1
      src/env/node/git/localGitProvider.ts
  2. +3
    -6
      src/git/models/repository.ts

+ 1
- 1
src/env/node/git/localGitProvider.ts View File

@ -345,7 +345,7 @@ export class LocalGitProvider implements GitProvider, Disposable {
if (scmGit == null) return; if (scmGit == null) return;
// Find env to pass to Git // Find env to pass to Git
if (configuration.get('experimental.nativeGit') ?? this.container.prereleaseOrDebugging) {
if (configuration.get('experimental.nativeGit')) {
for (const v of Object.values(scmGit.git)) { for (const v of Object.values(scmGit.git)) {
if (v != null && typeof v === 'object' && 'git' in v) { if (v != null && typeof v === 'object' && 'git' in v) {
for (const vv of Object.values(v.git)) { for (const vv of Object.values(v.git)) {

+ 3
- 6
src/git/models/repository.ts View File

@ -593,10 +593,7 @@ export class Repository implements Disposable {
remote?: string; remote?: string;
}) { }) {
try { try {
if (
options?.branch != null ||
(configuration.get('experimental.nativeGit') ?? this.container.prereleaseOrDebugging)
) {
if (options?.branch != null || configuration.get('experimental.nativeGit')) {
await this.container.git.fetch(this.uri, options); await this.container.git.fetch(this.uri, options);
} else { } else {
void (await executeCoreGitCommand('git.fetch', this.path)); void (await executeCoreGitCommand('git.fetch', this.path));
@ -798,7 +795,7 @@ export class Repository implements Disposable {
private async pullCore(options?: { rebase?: boolean }) { private async pullCore(options?: { rebase?: boolean }) {
try { try {
if (configuration.get('experimental.nativeGit') ?? this.container.prereleaseOrDebugging) {
if (configuration.get('experimental.nativeGit')) {
const withTags = configuration.getAny<CoreGitConfiguration, boolean>('git.pullTags', this.uri); const withTags = configuration.getAny<CoreGitConfiguration, boolean>('git.pullTags', this.uri);
if (configuration.getAny<CoreGitConfiguration, boolean>('git.fetchOnPull', this.uri)) { if (configuration.getAny<CoreGitConfiguration, boolean>('git.fetchOnPull', this.uri)) {
await this.container.git.fetch(this.uri); await this.container.git.fetch(this.uri);
@ -884,7 +881,7 @@ export class Repository implements Disposable {
}; };
}) { }) {
try { try {
if (configuration.get('experimental.nativeGit') ?? this.container.prereleaseOrDebugging) {
if (configuration.get('experimental.nativeGit')) {
const branch = await this.getBranch(options?.reference?.name); const branch = await this.getBranch(options?.reference?.name);
await this.container.git.push(this.uri, { await this.container.git.push(this.uri, {
force: options?.force, force: options?.force,

Loading…
Cancel
Save