mirror of
https://github.com/actions/checkout.git
synced 2025-06-08 00:39:04 +00:00
Add objectFormat setting to allow init()ing a repo with sha256
This commit is contained in:
parent
85e6279cec
commit
b9de40a228
9 changed files with 81 additions and 8 deletions
|
@ -375,4 +375,25 @@ describe('Test fetchDepth and fetchTags options', () => {
|
|||
expect.any(Object)
|
||||
)
|
||||
})
|
||||
|
||||
it('should call execGit with the correct arguments when sha256 is used', async () => {
|
||||
jest.spyOn(exec, 'exec').mockImplementation(mockExec)
|
||||
|
||||
const workingDirectory = 'test'
|
||||
const lfs = false
|
||||
const doSparseCheckout = false
|
||||
git = await commandManager.createCommandManager(
|
||||
workingDirectory,
|
||||
lfs,
|
||||
doSparseCheckout
|
||||
)
|
||||
|
||||
await git.init({objectFormat: 'sha256'})
|
||||
|
||||
expect(mockExec).toHaveBeenCalledWith(
|
||||
expect.any(String),
|
||||
['init', '--object-format=sha256', 'test'],
|
||||
expect.any(Object)
|
||||
)
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue