libgit2 / libgit2/libgit2

git_config_backend_from_string and git_config_backend_from_values are publicly documented but are hidden symbols

Open Beginner friendly
#7,305 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
10.6k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

The C functions git_config_backend_from_string and git_config_backend_from_values added in 1.8.0 are documented here and here, respectively. The documentation does not mention anything about their being private / internal-use functions. Other functions in sys/config.h are GIT_EXTERN and have default visibility. However, these two functions are merely extern and have hidden visibility. This makes it impossible to use them from a shared library (and, thus, impossible to use in pygit2).

Either the documentation should be updated to reflect that they are hidden symbols, or they should be made GIT_EXTERN like all other functions in that header. They are the only two functions in that header that aren't GIT_EXTERN. Much bigger hoops have to be jumped-through in order to have an in-memory backend without these functions (all the callbacks have to be implemented, and there are many), so my recommendation is to make these GIT_EXTERN.

I'm happing to post a pull request to make these GIT_EXTERN if that's the approved approach, but I didn't want to presume that's correct.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with sys/config.h and the two linked reference pages. Compare these declarations with the neighboring GIT_EXTERN functions and confirm whether the project intends them to be public or internal. Done means the chosen resolution—exporting the functions or documenting them as hidden—is applied consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, git
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.