Created
June 27, 2014 08:43
-
-
Save fracek/9afab034f8a582492e3b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define method git-repository-init | |
(path :: <string>, | |
#key bare? :: <boolean> = #f, | |
flags :: false-or(<integer>) = #f, | |
mode :: false-or(<integer>) = #f, | |
working-directory :: false-or(<string>) = #f, | |
description :: false-or(<string>) = #f, | |
template-path :: false-or(<string>) = #f, | |
initial-head :: false-or(<string>) = #f, | |
origin-url :: false-or(<string>) = #f) | |
=> (err, repo) | |
if (flags | mode | working-directory | description | template-path | initial-head | origin-url) | |
let opts = make(<git-repository-init-options*>); | |
if (flags) | |
git_repository_init_options$flags(opts) := flags; | |
end if; | |
if (mode) | |
git_repository_init_options$mode(opts) := mode; | |
end if; | |
%git-repository-init-ext(path, options) | |
else | |
%git-repository-init(path, if (bare?) 1 else 0 end) | |
end if | |
end method git-repository-init; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment