Skip to content

Missing property accessors in git_repository #220

Closed
@txdv

Description

@txdv

the git_repository struct is not public and has some fields of interest which are not yet exposed: path_index, path_odb, is_bare.

Are these going to be be exposed with some functions?

Original struct:

struct git_repository {
  git_odb *db;
  git_index *index;

  git_cache objects;
  git_refcache references;

  char *path_repository; // exposed
  char *path_index; // not exposed
  char *path_odb; // not exposed
  char *path_workdir; // exposed

  unsigned is_bare:1; // not exposed
  unsigned int lru_counter;
};

I mean when I look at this:

const char *git_repository_path(git_repository *repo)
{
  assert(repo);
  return repo->path_repository;
}

const char *git_repository_workdir(git_repository *repo)
{
  assert(repo);
  return repo->path_workdir;
}

It really isn't that hard to add 3 more additional properties like that -.-

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions