libgit2 / libgit2/libgit2

git_config_backend_from_string and git_config_backend_from_values are publicly documented but are hidden symbols

未关闭 适合新手
#7,305 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
C
星标
10.6k
派生
2.7k
PR 合并指标
30 天内没有已合并 PR

描述

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.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 sys/config.h 和链接的两个参考页面开始。将这些声明与相邻的 GIT_EXTERN 函数进行比较,并确认项目是否打算将它们设为公开或内部。只有在所选的解决方案——导出这些函数或将其记录为隐藏——得到一致应用后,才算完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
c, git
领域
api
Issue 类型
缺陷
难度
2/5
预计耗时
1-3 小时
活跃度
冷清
描述清晰度
基本清楚
新手友好度
62/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。