Skip to content

armgit / orca

Public Imported from GitHub
0

Orca is the place for working with a fleet of agents (e.g. Grok Bot, Claude Code). Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

987 B
Raw Blame
import { describe, expect, it } from 'vitest'

import { windowsLongPathGitArgs } from './windows-long-path-git-args'

describe('windowsLongPathGitArgs', () => {
  it('enables long paths for a Windows drive path', () => {
    expect(windowsLongPathGitArgs('C:\\Users\\dev\\repo', 'win32')).toEqual([
      '-c',
      'core.longpaths=true'
    ])
  })

  it.each(['darwin', 'linux'] as const)('returns nothing on %s', (platform) => {
    expect(windowsLongPathGitArgs('/home/dev/repo', platform)).toEqual([])
  })

  it.each(['\\\\wsl.localhost\\Ubuntu\\home\\dev\\repo', '\\\\wsl$\\Ubuntu\\home\\dev\\repo'])(
    'returns nothing for the WSL UNC path %s',
    (cwd) => {
      expect(windowsLongPathGitArgs(cwd, 'win32')).toEqual([])
    }
  )

  it('never mutates the shared constant', () => {
    const first = windowsLongPathGitArgs('C:\\repo', 'win32')
    first.push('--bogus')
    expect(windowsLongPathGitArgs('C:\\repo', 'win32')).toEqual(['-c', 'core.longpaths=true'])
  })
})