Skip to contentSkip to conversation

Starting work on man pages for gitweb and gitweb.conf (WIP)

PATCH In review Jakub Narebski 2 participants 5 messages Jun 15, 2016 Documentation

lore
Share & tools
lore
#0 lore raw

cover Starting work on man pages for gitweb and gitweb.conf (WIP)

This is very much work in progress.

1. The man page for /etc/gitweb.conf is modified, extended and improved version of patch by Drew Northup from

"[PATCH/WIP] Starting work on a man page for /etc/gitweb.conf"
http://thread.gmane.org/gmane.comp.version-control.git/173422

Drew version was mostly pulled directly from the README and INSTALL files of gitweb. I have tried to incorporate comments in mentioned thread, and to group config variables by category.

2. The man page for gitweb is slightly extended version of patch I have sent to git mailing list as

"[RFC/PATCH] gitweb: Starting work on a man page for gitweb (WIP)"
http://thread.gmane.org/gmane.comp.version-control.git/173422/focus=173625

NOTE that I have only tested that both generated manpages _looks_ (halfway) reasonable. I didn't check HTML output.

The major part that is left (besides extending both manpages with new information) is actually de-duplicate contents, i.e. delete those parts of gitweb/README and gitweb/INSTALL that were copied to those new manpages.

Both of those are also available in 'gitweb/doc' branch in one of my repositories:

git://repo.or.cz/git/jnareb-git.git
git://github.com/jnareb/git.git

Shortlog:
~~~~~~~~~
Drew Northup (1):
Starting work on a man page for /etc/gitweb.conf (WIP)

Jakub Narebski (1):
gitweb: Starting work on a man page for gitweb (WIP)

Diffstat:
~~~~~~~~~

 Documentation/Makefile        |    4 +-
 Documentation/gitweb.conf.txt |  436 +++++++++++++++++++++++++++++++++++++++++
 Documentation/gitweb.txt      |  334 +++++++++++++++++++++++++++++++
 git.spec.in                   |    3 +
 gitweb/Makefile               |   14 ++
 5 files changed, 789 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/gitweb.conf.txt
 create mode 100644 Documentation/gitweb.txt
Signature · 1 line
1.7.5
#1 lore raw

PATCH 1/2 Starting work on a man page for /etc/gitweb.conf (WIP)

From: Drew Northup <[email protected]>

This is a work in progress. Much of what is in it has been pulled directly from the README and INSTALL files of gitweb. No effort has yet been made to de-duplicate any of this.

TODO:
* Clean up README and INSTALL files
* Move most of gitweb's README and INSTALL into gitweb.txt and gitweb.conf.txt, so that gitweb documentation can be easily viewed.
* Remove or rephrase redundant portions of original documentation
* A lot more...

---
 Documentation/Makefile        |    2 +-
 Documentation/gitweb.conf.txt |  436 +++++++++++++++++++++++++++++++++++++++++
 git.spec.in                   |    3 +
 gitweb/Makefile               |   13 ++
 4 files changed, 453 insertions(+), 1 deletions(-)
 create mode 100644 Documentation/gitweb.conf.txt
Documentation/Makefile +1 -1
index 36989b7..74ed959 100644
@@ -3,7 +3,7 @@ MAN1_TXT= \
 		$(wildcard git-*.txt)) \
 	gitk.txt git.txt
 MAN5_TXT=gitattributes.txt gitignore.txt gitmodules.txt githooks.txt \
-	gitrepository-layout.txt
+	gitrepository-layout.txt gitweb.conf.txt
 MAN7_TXT=gitcli.txt gittutorial.txt gittutorial-2.txt \
 	gitcvs-migration.txt gitcore-tutorial.txt gitglossary.txt \
 	gitdiffcore.txt gitrevisions.txt gitworkflows.txt
Documentation/gitweb.conf.txt new file +436 -0

436 lines not on this page · raw message

git.spec.in +3 -0
index 91c8462..06b27eb 100644
@@ -200,6 +200,9 @@ rm -rf $RPM_BUILD_ROOT
 %files -n gitweb
 %defattr(-,root,root)
 %{_datadir}/gitweb
+%{!?_without_docs: %{_mandir}/man1/*gitweb*.1*}
+%{!?_without_docs: %{_mandir}/man5/*gitweb*.5*}
+%{!?_without_docs: %doc Documentation/*gitweb*.html }
 
 %files -n perl-Git -f perl-files
 %defattr(-,root,root)
gitweb/Makefile +13 -0
index 0a6ac00..582e1b0 100644
@@ -112,6 +112,14 @@ endif
 
 GITWEB_FILES += static/git-logo.png static/git-favicon.png
 
+GITWEB_MAN5_TXT = gitweb.conf.txt
+GITWEB_MAN_TXT = $(GITWEB_MAN1_TXT) $(GITWEB_MAN5_TXT) $(GITWEB_MAN7_TXT)
+GITWEB_MAN = $(patsubst %.txt,%.1,$(GITWEB_MAN1_TXT)) \
+             $(patsubst %.txt,%.5,$(GITWEB_MAN5_TXT)) \
+             $(patsubst %.txt,%.7,$(GITWEB_MAN7_TXT))
+GITWEB_HTML= $(patsubst %.txt,%.html,$(GITWEB_MAN_TXT))
+GITWEB_DOC = $(GITWEB_MAN) $(GITWEB_HTML)
+
 GITWEB_REPLACE = \
 	-e 's|++GIT_VERSION++|$(GIT_VERSION)|g' \
 	-e 's|++GIT_BINDIR++|$(bindir)|g' \
@@ -155,6 +163,11 @@ test-installed:
 	GITWEB_TEST_INSTALLED='$(DESTDIR_SQ)$(gitwebdir_SQ)' \
 		$(MAKE) -C ../t gitweb-test
 
+### Documentation
+
+doc:
+	$(MAKE) -C ../Documentation $(GITWEB_DOC)
+
 ### Installation rules
 
 install: all
Signature · 1 line
1.7.5
#2 lore raw

Re: [RFC/PATCHv2 1/2] Starting work on a man page for /etc/gitweb.conf (WIP)

Quoted 21 lines · Jakub Narebski
gitweb/Makefile +8 -0
index 0a6ac00..582e1b0 100644
@@ -112,6 +112,14 @@ endif
 
 GITWEB_FILES += static/git-logo.png static/git-favicon.png
 
+GITWEB_MAN5_TXT = gitweb.conf.txt
+GITWEB_MAN_TXT = $(GITWEB_MAN1_TXT) $(GITWEB_MAN5_TXT) $(GITWEB_MAN7_TXT)
+GITWEB_MAN = $(patsubst %.txt,%.1,$(GITWEB_MAN1_TXT)) \
+             $(patsubst %.txt,%.5,$(GITWEB_MAN5_TXT)) \
+             $(patsubst %.txt,%.7,$(GITWEB_MAN7_TXT))
+GITWEB_HTML= $(patsubst %.txt,%.html,$(GITWEB_MAN_TXT))
+GITWEB_DOC = $(GITWEB_MAN) $(GITWEB_HTML)
+
 GITWEB_REPLACE = \
 	-e 's|++GIT_VERSION++|$(GIT_VERSION)|g' \
 	-e 's|++GIT_BINDIR++|$(bindir)|g' \
@@ -155,6 +163,11 @@ test-installed:
 	GITWEB_TEST_INSTALLED='$(DESTDIR_SQ)$(gitwebdir_SQ)' \

gitweb/Makefile test-installed: · line 173

Quoted 10 lines
gitweb/Makefile +5 -0
 		$(MAKE) -C ../t gitweb-test
 
+### Documentation
+
+doc:
+	$(MAKE) -C ../Documentation $(GITWEB_DOC)
+
 ### Installation rules
 
 install: all

I am not sure if this target is needed or even desirable.

The only potential benefit this complexity and risk of these build procedure knowledge diverge what is in ../Documentation is to let you say "cd gitweb && make doc" and avoid building the rest of the documentation, but I personally do not find it necessary at all.

Aren't you making a mistake similar to the one that let instaweb have intimate and unnecessary knowledge of how to build gitweb, which you recently cleaned up?

#3 lore raw

Re: [RFC/PATCHv2 1/2] Starting work on a man page for /etc/gitweb.conf (WIP)

Quoted 32 lines · Junio C Hamano
Quoted 30 lines · Jakub Narebski
gitweb/Makefile +13 -0
index 0a6ac00..582e1b0 100644
@@ -112,6 +112,14 @@ endif
 
 GITWEB_FILES += static/git-logo.png static/git-favicon.png
 
+GITWEB_MAN5_TXT = gitweb.conf.txt
+GITWEB_MAN_TXT = $(GITWEB_MAN1_TXT) $(GITWEB_MAN5_TXT) $(GITWEB_MAN7_TXT)
+GITWEB_MAN = $(patsubst %.txt,%.1,$(GITWEB_MAN1_TXT)) \
+             $(patsubst %.txt,%.5,$(GITWEB_MAN5_TXT)) \
+             $(patsubst %.txt,%.7,$(GITWEB_MAN7_TXT))
+GITWEB_HTML= $(patsubst %.txt,%.html,$(GITWEB_MAN_TXT))
+GITWEB_DOC = $(GITWEB_MAN) $(GITWEB_HTML)
+
 GITWEB_REPLACE = \
 	-e 's|++GIT_VERSION++|$(GIT_VERSION)|g' \
 	-e 's|++GIT_BINDIR++|$(bindir)|g' \
@@ -155,6 +163,11 @@ test-installed:
 	GITWEB_TEST_INSTALLED='$(DESTDIR_SQ)$(gitwebdir_SQ)' \
 		$(MAKE) -C ../t gitweb-test
 
+### Documentation
+
+doc:
+	$(MAKE) -C ../Documentation $(GITWEB_DOC)
+
 ### Installation rules
 
Quoted 3 lines

gitweb/Makefile test-installed: · line 173

Quoted 1 line
gitweb/Makefile +0 -0
 install: all

I am not sure if this target is needed or even desirable.

Well, this is the target that it is nice to have. The implementation needs to be improved, as you noticed.

Quoted 8 lines

The only potential benefit this complexity and risk of these build procedure knowledge diverge what is in ../Documentation is to let you say "cd gitweb && make doc" and avoid building the rest of the documentation, but I personally do not find it necessary at all.

Aren't you making a mistake similar to the one that let instaweb have intimate and unnecessary knowledge of how to build gitweb, which you recently cleaned up?

Thanks for sanity check!

Instead of duplicating Documentation/Makefile knowledge in gitweb/Makefile, let's just proxy to Documentation/Makefile like for 'test' target:

  +doc:
  +	$(MAKE) -C ../Documentation gitweb
  +

In Documentation/Makefile the new 'gitweb' target could look just like this:

  +GITWEB_DOC = $(filter gitweb.%,$(DOC_HTML) $(DOC_MAN1) $(DOC_MAN5) $(DOC_MAN7)) 
  +gitweb: $(GITWEB_DOC)

And it would be much shorter, too.

Signature · 2 lines
Jakub Narebski
Poland
#4 lore raw

PATCH 2/2 gitweb: Starting work on a man page for gitweb (WIP)

In reply to Jakub Narebski

Gitweb documentation currently consist of gitweb/README, gitweb/INSTALL and comments in gitweb source code. This is harder to find, use and browse that manpages ("man gitweb" or "git help gitweb") and HTML documentation ("git help --web gitweb").

The goal is to move documentation out of gitweb/README to gitweb.txt and gitweb.conf.txt manpages, reducing its size 10x from around 500 to around 50 lines (two pages), and move information not related drectly to building and installing gitweb out of gitweb/INSTALL there.

To build gitweb documentation you can use

make -C gitweb doc

or

cd gitweb; make doc

This is a work in progress. Much of what is in it has been pulled directly from the README and INSTALL files of gitweb. No effort has yet been made to de-duplicate any of this, i.e. to remove contents from gitweb/README and gitweb/INSTALL. The AsciiDoc might (and probably does) contain formatting errors.

Current version is almost direct translation of SVN::Web manpage, and is missing much of information that finally are to be moved from gitweb/README to here.

---
 Documentation/Makefile        |    2 +-
 Documentation/gitweb.conf.txt |    2 +-
 Documentation/gitweb.txt      |  334 +++++++++++++++++++++++++++++++++++++++++
 gitweb/Makefile               |    1 +
 4 files changed, 337 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/gitweb.txt
Documentation/Makefile +1 -1
index 74ed959..bf7d7ef 100644
@@ -1,7 +1,7 @@
 MAN1_TXT= \
 	$(filter-out $(addsuffix .txt, $(ARTICLES) $(SP_ARTICLES)), \
 		$(wildcard git-*.txt)) \
-	gitk.txt git.txt
+	gitk.txt gitweb.txt git.txt
 MAN5_TXT=gitattributes.txt gitignore.txt gitmodules.txt githooks.txt \
 	gitrepository-layout.txt gitweb.conf.txt
 MAN7_TXT=gitcli.txt gittutorial.txt gittutorial-2.txt \
Documentation/gitweb.conf.txt +1 -1
index 34f65fa..4d773ab 100644
@@ -427,7 +427,7 @@ gitweb_config.perl::
 
 SEE ALSO
 --------
-linkgit:git-instaweb[1]
+linkgit:gitweb[1], linkgit:git-instaweb[1]
 
 'gitweb/README', 'gitweb/INSTALL'
 
Documentation/gitweb.txt new file +334 -0

334 lines not on this page · raw message

gitweb/Makefile +1 -0
index 582e1b0..240c10a 100644
@@ -112,6 +112,7 @@ endif
 
 GITWEB_FILES += static/git-logo.png static/git-favicon.png
 
+GITWEB_MAN1_TXT = gitweb.txt
 GITWEB_MAN5_TXT = gitweb.conf.txt
 GITWEB_MAN_TXT = $(GITWEB_MAN1_TXT) $(GITWEB_MAN5_TXT) $(GITWEB_MAN7_TXT)
 GITWEB_MAN = $(patsubst %.txt,%.1,$(GITWEB_MAN1_TXT)) \
Signature · 1 line
1.7.5