Skip to content

Commit

Permalink
fix: too long filename on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
scolladon committed Nov 8, 2024
1 parent 07d0806 commit aa7a566
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion __tests__/unit/lib/adapter/GitAdapter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ describe('GitAdapter', () => {
await gitAdapter.configureRepository()

// Assert
expect(mockedAddConfig).toBeCalledTimes(1)
expect(mockedAddConfig).toBeCalledTimes(2)
expect(mockedAddConfig).toBeCalledWith('core.longpaths', 'true')
expect(mockedAddConfig).toBeCalledWith('core.quotepath', 'off')
})
})
Expand Down
2 changes: 2 additions & 0 deletions src/adapter/GitAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,12 @@ export default class GitAdapter {
protected readonly simpleGit: SimpleGit

private constructor(protected readonly config: Config) {
// TODO Handle buffer size with the terminal
this.simpleGit = simpleGit({ baseDir: config.repo, trimmed: true })
}

public async configureRepository() {
await this.simpleGit.addConfig('core.longpaths', 'true')
await this.simpleGit.addConfig('core.quotepath', 'off')
}

Expand Down

0 comments on commit aa7a566

Please sign in to comment.