git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Complex gitweb URL
@ 2016-07-20 19:24 CLOSE Dave
  2016-07-20 21:20 ` Jakub Narębski
  2016-07-23 17:47 ` Jakub Narębski
  0 siblings, 2 replies; 7+ messages in thread
From: CLOSE Dave @ 2016-07-20 19:24 UTC (permalink / raw)
  To: git@vger.kernel.org

I'm trying to create a URL that will always refer to the latest version 
of a file stored under Gerrit. gitweb access is available. The man page 
specification doesn't seem to work for me. Instead, I seem to need to 
put most of the information into arguments (after the '?').

For example, the repo name includes several directories, so it doesn't 
work to put it into the 
".../gitweb.cgi/<repo>/<action>/<revision>:/<path>?<arguments>" format. 
Or, at least, I don't see how.

Instead I'm trying to use a URL in the format, 
"http://site/gitweb/?args". If I use gitweb itself to navigate to my 
target file, I see a URL in this format that contains several arguments, 
"p=repo;a=blob;f=file;h=SHA;hb=SHA". If I use that URL directly, I get 
my file. But those SHA values are not something I know how to determine 
in advance. And I suspect they are unique to the specific version of the 
file accessed, not always the latest as I want.

If I replace the hb=SHA argument with hb=HEAD, the URL still works. But 
I have no idea what I can use to replace the h=SHA argument.

A complication is that the target file is not in the master branch. 
Somehow I need to be able to specify the branch. I've tried putting it 
as the h= argument but that results in "Reading blob failed". If I leave 
out the h= argument entirely, gitweb responds, "404 cannot find file".

Are these arguments documented somewhere? What is the recommended way to 
construct a URL like I need?
-- 
	Dave Close

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-07-25 16:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-20 19:24 Complex gitweb URL CLOSE Dave
2016-07-20 21:20 ` Jakub Narębski
2016-07-20 21:35   ` CLOSE Dave
2016-07-20 21:50     ` Jakub Narębski
2016-07-20 21:46   ` CLOSE Dave
2016-07-23 17:47 ` Jakub Narębski
2016-07-25 16:34   ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).