You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Repository.init should accept boolean value for is_bare #538
if true, a Git repository without a working directory is created at the pointed path. If false, provided path will be considered as the working directory into which the .git directory will be created.
Yet the type of is_bare is expected to be a Number. Passing a boolean leads to an error: [Error: Number is_bare is required.].
Having the docs refer to true and false when the expected type is a Number seems incongruous, especially if the value of the number has no impact on the outcome (other than the whether the number is truthy or falsy). If the value of the number does matter, please update the docs to refer to numbers; otherwise I'd expect the function to be able to accept a boolean.
Activity
tbranyen commentedon Apr 13, 2015
Yup! We're aware of this issue: #383. It's not trivial, but we'll hopefully get it added in eventually as it's rather confusing.
tbranyen commentedon Apr 20, 2015
Closing as duplicate
ylecuyer commentedon Aug 15, 2018
I ran into this issue although it has been closed a long time ago