开发者

How can I get the source code of a file from GitWeb?

I want to download (via curl or AJAX) the HEAD revision of a file in a Git repository. GitWeb is already installed.

I can get the formatted source code: http://server1.local/?p=Project&a=blob&f=Path/To/File.html

However, this does not seem to work when I use blob_plain a开发者_JS百科s the value for "a"; blob_plain requires a hash in a "h" parameter - but I want to refer to the newest version of the file, not a specific one.

Is there something that needs to be configured? Am I using the right URL schema?


Which gitweb version?

Because it works for me. When I can access

http://localhost/cgi-bin/gitweb.cgi/git.git?a=blob;f=builtin/annotate.c

i can also access

http://localhost/cgi-bin/gitweb.cgi/git.git?a=blob_plain;f=builtin/annotate.c



You can always try to give HEAD as argument to 'hb', i.e.

http://server1.local/?p=Project&a=blob&f=Path/To/File.html&hb=HEAD
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜