Opened 12 years ago

Closed 5 years ago

#8510 closed enhancement (fixed)

cgit shortcomings

Reported by: axeld Owned by: haiku-web
Priority: normal Milestone:
Component: Website/Trac Version:
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

Is there a way to configure cgit to be more usable or is there a better replacement?

Either I don't find my way around it, or it's really as dumb. Just a few things where I couldn't find the link to press:

  • From the log of a file, go to the actual commit (not just the part that affects the file I was coming from).
  • From a certain commit, show me the entire file, not just the diff.

Change History (9)

comment:1 by axeld, 12 years ago

Just noticed that the second example is invalid: the change I was looking for was just older, so that it actually works as one would expect.

comment:2 by axeld, 12 years ago

Is it possible that cgit does not support annotations?

in reply to:  description comment:3 by zooey, 12 years ago

Replying to axeld:

Is there a way to configure cgit to be more usable or is there a better replacement?

Either I don't find my way around it, or it's really as dumb.

Nah, it's just you ;-)

Just a few things where I couldn't find the link to press:

  • From the log of a file, go to the actual commit (not just the part that affects the file I was coming from).

Directly underneath the header menu, where it says: 'path' followed by a listing of all the file's path components, click on 'root' - that will show you the entire commit. Clicking on any other sub-path will limit the commit accordingly.

  • From a certain commit, show me the entire file, not just the diff.

Just click on any of the four links to the file that are available:

  • click on the 'tree' heading
  • click on the file link shown in the tree line of the commit header
  • click on one of the two links shown in the diff header, bringing you to the version of the file before or after the commit

in reply to:  2 comment:4 by zooey, 12 years ago

Replying to axeld:

Is it possible that cgit does not support annotations?

Yes, that's right, it seems that it doesn't.

comment:5 by bonefish, 12 years ago

Summary: cgit suckscgit shortcomings

Adjusted the summary to be less rude.

Regarding the annotate/blame feature, that's something I've already missed, too. I took a look at the cgit sources and it isn't trivial to add. cgit uses the git sources as a static library. The blame implementation is, however, not exposed by git, but statically implemented in the blame command source file. So one would have to copy most of it, which probably wouldn't be accepted as a patch.

What I also miss is syntax highlighting. That's a configuration issue only, though. A source-filter command has to be set in cgitrc that performs the highlighting. There's an example how that can be done using the highlight script. I was tempted to set that up, but since there's no official ("stable") openSUSE repository containing highlight, I was unsure how to install it. Add an "unstable" repository? Or would be better be added to the "haiku-admin" repository?

comment:6 by nielx, 6 years ago

It's odd. The enable-blame configuration is enabled for cgit. However, it does not seem to generate the blame pages.

comment:7 by korli, 6 years ago

https://github.com/zx2c4/cgit/commits/master/ui-blame.c seems fairly new, seems not included in v1.1.

comment:8 by pulkomandy, 6 years ago

cgit v1.2 (and 1.2.1) was released last month. We should consider an update and then close this issue, I guess?

We have syntax highlighting now and the other issues were just discoverability problems.

comment:9 by waddlesplash, 5 years ago

Resolution: fixed
Status: newclosed

The Docker container now uses Alpine Linux as of https://github.com/haiku/infrastructure/commit/e1578ff3d5e96c20ac367c2de25ceb538f2a95dc and thus also cgit 1.2.1, and the blame UI has been enabled.

Note: See TracTickets for help on using tickets.