Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check git version before attempting to disable sparse-checkout #1656

Merged
merged 5 commits into from
Mar 14, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
ran npm run format
  • Loading branch information
jww3 committed Mar 12, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 3471f851f6cb9d9ef1426bbb7b05b038f65babd8
3 changes: 1 addition & 2 deletions __test__/git-version.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { GitVersion } from '../src/git-version'
import {GitVersion} from '../src/git-version'
import {MinimumGitSparseCheckoutVersion} from '../src/git-command-manager'


describe('git-version tests', () => {
it('basics', async () => {
let version = new GitVersion('')
2 changes: 1 addition & 1 deletion src/git-command-manager.ts
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ import {GitVersion} from './git-version'
// Wire protocol v2 not supported before 2.18
// sparse-checkout not supported before 2.25
export const MinimumGitVersion = new GitVersion('2.18')
export const MinimumGitSparseCheckoutVersion = new GitVersion('2.25');
export const MinimumGitSparseCheckoutVersion = new GitVersion('2.25')

export interface IGitCommandManager {
branchDelete(remote: boolean, branch: string): Promise<void>
5 changes: 4 additions & 1 deletion src/git-source-provider.ts
Original file line number Diff line number Diff line change
@@ -9,7 +9,10 @@ import * as path from 'path'
import * as refHelper from './ref-helper'
import * as stateHelper from './state-helper'
import * as urlHelper from './url-helper'
import {MinimumGitSparseCheckoutVersion, IGitCommandManager} from './git-command-manager'
import {
MinimumGitSparseCheckoutVersion,
IGitCommandManager
} from './git-command-manager'
import {IGitSourceSettings} from './git-source-settings'

export async function getSource(settings: IGitSourceSettings): Promise<void> {
Loading