Skip to content

git.PlainCloneContext doesn't obey umask.  #1371

Open
go-git/go-billy
#104
@james-lawrence

Description

@james-lawrence

calling the following with umask 0002 I expected the creation of a directory that matches gits behavior.

	_, err = git.PlainCloneContext(ctx, dir, false, &git.CloneOptions{
		URL:               uri,
		ReferenceName:     branchRefName,
		RecurseSubmodules: git.DefaultSubmoduleRecursionDepth,
		Auth:              auth,
		SingleBranch:      true,
	})

git command for comparison.

umask 0002
git clone [email protected]:egdaemon/eg.git gitcmd

results:

ls -lha clone/
total 16K
drwxrwxr-x  4 user user 4.0K Jan  7 13:49 .
drwxrwx--- 26 user user 4.0K Jan  7 13:49 ..
drwxrwxr-x 24 user user 4.0K Jan  7 13:48 gitcmd
drwxr-xr-x 24 user user 4.0K Jan  7 13:45 golanglib

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is neededno-autocloseIssues/PRs to be ignored by stale bot

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions