dulwich does not honour Repo.init[_bare](.., mkdir=True)

Bug #671159 reported by yvesf
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Dulwich
Fix Released
Medium
Unassigned

Bug Description

the mkdir flag is never used

    @classmethod
    def init(cls, path, mkdir=True):
        controldir = os.path.join(path, ".git")
        os.mkdir(controldir)
        cls.init_bare(controldir)
        return cls(path)

    @classmethod
    def init_bare(cls, path, mkdir=True):
        for d in BASE_DIRECTORIES:
            os.mkdir(os.path.join(path, *d))
        DiskObjectStore.init(os.path.join(path, OBJECTDIR))
        ret.refs.set_symbolic_ref("HEAD", "refs/heads/master")
        ret._init_files()
        return ret

Jelmer Vernooij (jelmer)
Changed in dulwich:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Dave Borowitz (dborowitz) wrote :

Looks like this was fixed in 612e26d3.

I'll mail a patch today that does a recursive mkdir to be consistent with C git:
$ ls foo
ls: cannot access foo: No such file or directory
$ git init foo/bar/baz/quux
Initialized empty Git repository in /tmp/foo/bar/baz/quux/.git/

Jelmer Vernooij (jelmer)
Changed in dulwich:
status: Triaged → Fix Committed
milestone: none → 0.7.0
Jelmer Vernooij (jelmer)
Changed in dulwich:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.