diff/view/blame not working

112 views
Skip to first unread message

Thorsten Kaufmann

unread,
Jun 19, 2012, 3:03:52 AM6/19/12
to git...@googlegroups.com
Hey there,

the topic is a tad misleading i guess, but i did not know how to describe better in a subject. I am running gitblit go on ubuntu, and so far it seems to run smooth and nice except for one thing.
I can click the view/diff/blame links on the summary page just fine. If i click view, and then on any of the view/diff/blame links in the commit view's "changed files" area i get a 404. The ones in
the tweak area work fine on the same page.

Any ideas what might cause this?

Regards,
Thorsten

James Moger

unread,
Jun 19, 2012, 7:43:52 AM6/19/12
to git...@googlegroups.com
Hmmm. That is weird. Are you running GO behind a proxy? Can you
compare the links for a working diff and a broken diff?

I'm not sure what "tweak area" means.

-J

Thorsten Kaufmann

unread,
Jun 19, 2012, 8:14:54 AM6/19/12
to git...@googlegroups.com
Damn. There is of course now "tweaks" area. It has the commit message as title, and i didn't think enough.

What i was referring to is the upper area in this screenshot

It seems the link has a slash replaced with %2F in a quick look. But what may cause that? I do run gitblit behind apache using
mod_proxy.

Regards,
Thorsten

it has view/diff for the "parent" field. These work. The ones next to the files down in the "changed files" area don't.

James Moger

unread,
Jun 19, 2012, 9:04:14 AM6/19/12
to git...@googlegroups.com
Wicket (the web framework used by Gitblit) replaces forward-slashes in
parameters with %2F. It has to do this because it uses
forward-slashes to delimit parameters in mounted/pretty urls.

Example: http://localhost/param1/param2/param3

if param2 had a a '/' in it then Wicket will not be able to identify
param3. So Wicket replaces the '/' with %2F so the url will be:
http://localhost/param1/my%2Fparam%2F2/param3

Some proxy's really do not like %2F encoded values and they re-encode
those as / before forwarding on to Gitblit. This breaks
Wicket/Gitblit. When you are running behind a proxy you have to take
an extra step or two to make sure your urls work properly.

Pick one:
1. web.mountParameters = false
2. web.forwardSlashCharacter = !

For example the demo site runs on a JBoss instance behind one of
RedHat's proxy servers. The demo uses web.forwardSlashCharacter = !
to get around proxy server interference.

e.g.
https://demo-gitblit.rhcloud.com/blob/gitblit.git/67d4f89b0cddb3de05c20e08c20f1bea714c2a9e/src!com!gitblit!GitServlet.java

-J

Thorsten Kaufmann

unread,
Jun 19, 2012, 9:19:21 AM6/19/12
to git...@googlegroups.com
I just took a look at the console interactively and i assume this is my problem:

ERROR /srv/git/repositories/xxxxxxxxxxxxxxxxxxxxxx.git failed to retrieve refs/heads/
org.eclipse.jgit.errors.MissingObjectException: Missing unknown 6955702ce31e18b97aa497309a91bc43f54fefc2

So it also seems to work for other repos. I got no idea how that might happen tho.

Regards,
Thorsten

Thorsten Kaufmann

unread,
Jun 19, 2012, 9:40:10 AM6/19/12
to git...@googlegroups.com
This only happened once now and i was not able to reproduce it. Switching to ! as forward slash character works fine. Thanks a lot!

Now i just need to fix the ubuntu start script heh
Reply all
Reply to author
Forward
0 new messages