mirror of
https://github.com/yangskyboxlabs/action-checkout.git
synced 2025-12-13 21:18:25 +01:00
Add objectFormat setting to allow init()ing a repo with sha256
This commit is contained in:
parent
9a9194f871
commit
85f76c73cb
4 changed files with 20 additions and 7 deletions
10
dist/index.js
vendored
10
dist/index.js
vendored
|
|
@ -711,9 +711,13 @@ class GitCommandManager {
|
|||
getWorkingDirectory() {
|
||||
return this.workingDirectory;
|
||||
}
|
||||
init() {
|
||||
init(options) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
yield this.execGit(['init', this.workingDirectory]);
|
||||
yield this.execGit([
|
||||
'init',
|
||||
...((options === null || options === void 0 ? void 0 : options.objectFormat) ? [`--object-format=${options.objectFormat}`] : []),
|
||||
this.workingDirectory
|
||||
]);
|
||||
});
|
||||
}
|
||||
isDetached() {
|
||||
|
|
@ -1238,7 +1242,7 @@ function getSource(settings) {
|
|||
// Initialize the repository
|
||||
if (!fsHelper.directoryExistsSync(path.join(settings.repositoryPath, '.git'))) {
|
||||
core.startGroup('Initializing the repository');
|
||||
yield git.init();
|
||||
yield git.init({ objectFormat: settings.objectFormat });
|
||||
yield git.remoteAdd('origin', repositoryUrl);
|
||||
core.endGroup();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue