Reputation: 10950
From the working directory of a git repository, I start git instaweb using git instaweb --httpd=webrick
. However, in the tree view of the resulting website, there is no link to each file's "blame". I tried to enable "blame" by adding the following to ~/.gitconfig
:
[gitweb]
blame = true
Even after I restart git instaweb (git instaweb stop
, git instaweb --httpd=webrick
), the "blame" links are still missing. How do I enable "blame" when using git instaweb?
Upvotes: 0
Views: 343
Reputation: 517
Create a file named /etc/gitweb-common.conf
like this:
sudo cat >> /etc/gitweb-common.conf <<EOF
\$feature{'highlight'}{'default'} = [1];
\$feature{'blame'}{'default'} = [1];
EOF
It should work now. But do notice that you might run into other problems, e.g. AppArmor. If that is the case, please take a look into this post: Problem with `git instaweb` on OpenSUSE Tumbleweed: /etc/gitweb-common.conf is not being read.
A full explanation of the issue with configuration files can be found here: gitweb refusing to blame.
Upvotes: 0