public static GitRepositoryInitOptions BuildFrom(FilePath workdirPath, bool isBare)
        {
            var opts = new GitRepositoryInitOptions
            {
                Flags = GitRepositoryInitFlags.GIT_REPOSITORY_INIT_MKPATH,
                Mode  = 0                /* GIT_REPOSITORY_INIT_SHARED_UMASK  */
            };

            if (workdirPath != null)
            {
                Debug.Assert(!isBare);

                opts.WorkDirPath = FilePathMarshaler.FromManaged(workdirPath);
            }

            if (isBare)
            {
                opts.Flags |= GitRepositoryInitFlags.GIT_REPOSITORY_INIT_BARE;
            }

            return(opts);
        }
        public static GitRepositoryInitOptions BuildFrom(FilePath workdirPath, bool isBare)
        {
            var opts = new GitRepositoryInitOptions
                           {
                               Flags = GitRepositoryInitFlags.GIT_REPOSITORY_INIT_MKPATH,
                               Mode = 0  /* GIT_REPOSITORY_INIT_SHARED_UMASK  */
                           };

            if (workdirPath != null)
            {
                Debug.Assert(!isBare);

                opts.WorkDirPath = StrictFilePathMarshaler.FromManaged(workdirPath);
            }

            if (isBare)
            {
                opts.Flags |= GitRepositoryInitFlags.GIT_REPOSITORY_INIT_BARE;
            }

            return opts;
        }