我想(通过 curl 或 AJAX)下载 Git 存储库中文件的 HEAD 修订版。GitWeb 已经安装好了。
我可以得到格式化的源代码: http://server1.local/?p=Project&a=blob&f=Path/To/File.html
但是,当我使用 blob_plain 作为“a”的值时,这似乎不起作用;blob_plain 需要在“h”参数中使用哈希 - 但我想引用文件的最新版本,而不是特定版本。
有什么需要配置的吗?我是否使用了正确的 URL 架构?
我想(通过 curl 或 AJAX)下载 Git 存储库中文件的 HEAD 修订版。GitWeb 已经安装好了。
我可以得到格式化的源代码: http://server1.local/?p=Project&a=blob&f=Path/To/File.html
但是,当我使用 blob_plain 作为“a”的值时,这似乎不起作用;blob_plain 需要在“h”参数中使用哈希 - 但我想引用文件的最新版本,而不是特定版本。
有什么需要配置的吗?我是否使用了正确的 URL 架构?
哪个gitweb版本?
因为它对我有用。我什么时候可以访问
http://localhost/cgi-bin/gitweb.cgi/git.git?a=blob;f=builtin/annotate.c
我也可以访问
http://localhost/cgi-bin/gitweb.cgi/git.git?a=blob_plain;f=builtin/annotate.c
你总是可以尝试给HEAD
'hb'作为参数,即
http://server1.local/?p=Project&a=blob&f=Path/To/File.html&hb=HEAD