From 511147de010477fc7808df7fc535a32dd59fae31 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Thu, 8 Jun 2006 03:57:55 +0200 Subject: [PATCH] Misc doc improvements --- Makefile | 2 +- asciidoc.conf | 32 +++++++++++++++++++++ manual.txt | 79 ++++++++++++++++++++++++++++++++++++++------------- tig.1.txt | 5 +++- web.conf | 7 ----- 5 files changed, 96 insertions(+), 29 deletions(-) create mode 100644 asciidoc.conf delete mode 100644 web.conf diff --git a/Makefile b/Makefile index 6d595f4..2020eba 100644 --- a/Makefile +++ b/Makefile @@ -50,7 +50,7 @@ strip: all tig: tig.c README.html: README - asciidoc -b xhtml11 -d article -f web.conf $< + asciidoc -b xhtml11 -d article -a readme $< %.1.html : %.1.txt asciidoc -b xhtml11 -d manpage $< diff --git a/asciidoc.conf b/asciidoc.conf new file mode 100644 index 0000000..a23a8f4 --- /dev/null +++ b/asciidoc.conf @@ -0,0 +1,32 @@ +ifdef::backend-docbook[] +[gitlink-inlinemacro] +{0%{target}} +{0#} +{0#{target}{0}} +{0#} +endif::backend-docbook[] + +ifdef::backend-docbook[] +# "unbreak" docbook-xsl v1.68 for manpages. v1.69 works with or without this. +[listingblock] +{title} + +| + +{title#} +endif::backend-docbook[] + +ifdef::backend-xhtml11[] +[gitlink-inlinemacro] +{target}{0?({0})} +endif::backend-xhtml11[] + +ifdef::readme[] +# No header or footers for README.html +[header] +
+

{doctitle}

+ +[footer] +
+endif::readme[] diff --git a/manual.txt b/manual.txt index b530f1c..424eee6 100644 --- a/manual.txt +++ b/manual.txt @@ -23,7 +23,9 @@ colorizing output from various git commands. Example on how to colorize the output of git-show(1): - $ git show | tig +----------------------------------------------------------------------------- +$ git show | tig +----------------------------------------------------------------------------- Git Command Options ~~~~~~~~~~~~~~~~~~~ @@ -39,7 +41,9 @@ expected by the main view. Example on how to open the log view and show both author and committer information: - $ tig log --pretty=fuller +----------------------------------------------------------------------------- +$ tig log --pretty=fuller +----------------------------------------------------------------------------- See the <> section below for an introduction to revision options supported by the git commands. For details on specific git @@ -57,12 +61,16 @@ Repository References Commits that are referenced by tags and branch heads will be marked by the reference name surrounded by '[' and ']': - 2006-03-26 19:42 Petr Baudis | [cogito-0.17.1] Cogito 0.17.1 +----------------------------------------------------------------------------- +2006-03-26 19:42 Petr Baudis | [cogito-0.17.1] Cogito 0.17.1 +----------------------------------------------------------------------------- If you want to filter out certain directories under `.git/refs/`, say `tmp` you can do it by setting the following variable: - $ TIG_LS_REMOTE="git ls-remote . | sed /\/tmp\//d" tig +----------------------------------------------------------------------------- +$ TIG_LS_REMOTE="git ls-remote . | sed /\/tmp\//d" tig +----------------------------------------------------------------------------- Or set the variable permanently in your environment. @@ -78,7 +86,9 @@ It is possible to alter which commands are used for the different views. If for example you prefer commits in the main view to be sorted by date and only show 500 commits, use: - $ TIG_MAIN_CMD="git log --date-order -n500 --pretty=raw %s" tig +----------------------------------------------------------------------------- +$ TIG_MAIN_CMD="git log --date-order -n500 --pretty=raw %s" tig +----------------------------------------------------------------------------- Or set the variable permanently in your environment. @@ -109,7 +119,9 @@ possible to split both the main and log view to also show the commit diff. If you are in the log view and press 'Enter' when the current line is a commit line, such as: - commit 4d55caff4cc89335192f3e566004b4ceef572521 +----------------------------------------------------------------------------- +commit 4d55caff4cc89335192f3e566004b4ceef572521 +----------------------------------------------------------------------------- You will split the view so that the log view is displayed in the top window and the diff view in the bottom window. You can switch between the two views @@ -129,7 +141,7 @@ revision to show history. Views ~~~~~ -tig(1) presents various 'views' of a repository. Each view is based on output +Various 'views' of a repository is presented. Each view is based on output from an external command, most often 'git log', 'git diff', or 'git show'. The main view:: @@ -160,13 +172,17 @@ Title Windows Each view has a title window which shows the name of the view, current commit ID if available, and where the view is positioned: - [main] c622eefaa485995320bc743431bae0d497b1d875 - commit 1 of 61 (1%) +----------------------------------------------------------------------------- +[main] c622eefaa485995320bc743431bae0d497b1d875 - commit 1 of 61 (1%) +----------------------------------------------------------------------------- By default, the title of the current view is highlighted using bold font. For long loading views (taking over 3 seconds) the time since loading started will be appended: - [main] 77d9e40fbcea3238015aea403e06f61542df9a31 - commit 1 of 779 (0%) 5s +----------------------------------------------------------------------------- +[main] 77d9e40fbcea3238015aea403e06f61542df9a31 - commit 1 of 779 (0%) 5s +----------------------------------------------------------------------------- Keys ---- @@ -244,7 +260,7 @@ r:: Redraw screen. z:: Stop all background loading. This can be useful if you use - tig(1) in a repository with a long history without limiting + tig in a repository with a long history without limiting the revision log. v:: Show version. @@ -263,7 +279,7 @@ Revision Specification ---------------------- This section describes various ways to specify what revisions to display or -otherwise limit the view to. tig(1) does not itself parse the described +otherwise limit the view to. Tig does not itself parse the described revision options so refer to the relevant git man pages for futher information. Relevant man pages besides git-log(1) are git-diff(1) and git-rev-list(1). @@ -278,17 +294,21 @@ Limit by Path Name If you are interested only in those revisions that made changes to a specific file (or even several files) list the files like this: - $ tig log Makefile README +----------------------------------------------------------------------------- +$ tig log Makefile README +----------------------------------------------------------------------------- To avoid ambiguity with repository references such as tag name, be sure to separate file names from other git options using "\--". So if you have a file named 'master' it will clash with the reference named 'master', and thus you will have to use: - $ tig log -- master +----------------------------------------------------------------------------- +$ tig log -- master +----------------------------------------------------------------------------- NOTE: For the main view, avoiding ambiguity will in some cases require you to -specify two "\--" options. The first will make tig(1) stop option processing +specify two "\--" options. The first will make tig stop option processing and the latter will be passed to git log. Limit by Date or Number @@ -301,7 +321,9 @@ both for the log and main view. Either limit by date using e.g. If you are only interested in changed that happened between two dates you can use: - $ tig -- --after="May 5th" --before="2006-05-16 15:44" +----------------------------------------------------------------------------- +$ tig -- --after="May 5th" --before="2006-05-16 15:44" +----------------------------------------------------------------------------- NOTE: If you want to avoid having to quote dates containing spaces you can use "." instead, e.g. `--after=May.5th`. @@ -312,13 +334,17 @@ Limiting by Commit Ranges Alternatively, commits can be limited to a specific range, such as "all commits between 'tag-1.0' and 'tag-2.0'". For example: - $ tig log tag-1.0..tag-2.0 +----------------------------------------------------------------------------- +$ tig log tag-1.0..tag-2.0 +----------------------------------------------------------------------------- This way of commit limiting makes it trivial to only browse the commits which haven't been pushed to a remote branch. Assuming 'origin' is your upstream remote branch, using: - $ tig log origin..HEAD +----------------------------------------------------------------------------- +$ tig log origin..HEAD +----------------------------------------------------------------------------- will list what will be pushed to the remote branch. Optionally, the ending 'HEAD' can be left out since it is implied. @@ -334,7 +360,9 @@ revision in question. If you prefer to specify which commit to preview in this way use the following: - $ tig log tag-2.0 ^tag-1.0 +----------------------------------------------------------------------------- +$ tig log tag-2.0 ^tag-1.0 +----------------------------------------------------------------------------- You can think of '^' as a negation operator. Using this alternate syntax, it is possible to further prune commits by specifying multiple branch cut offs. @@ -346,7 +374,9 @@ Revisions options can to some degree be combined, which makes it possible to say "show at most 20 commits from within the last month that changed files under the Documentation/ directory." - $ tig -- --since=1.month -n20 -- Documentation/ +----------------------------------------------------------------------------- +$ tig -- --since=1.month -n20 -- Documentation/ +----------------------------------------------------------------------------- Examining All Repository References ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -356,7 +386,9 @@ repository. An example is to ask "did any line of development in this repository change a particular file within the last week". This can be accomplished using: - $ tig -- --all --since=1.week -- Makefile +----------------------------------------------------------------------------- +$ tig -- --all --since=1.week -- Makefile +----------------------------------------------------------------------------- include::BUGS[] @@ -373,6 +405,13 @@ the Free Software Foundation; either version 2 of the License, or References and Related Tools ---------------------------- +Manpages: + + - gitlink:tig[1] + - gitlink:tigrc[5] + +Online resources: + include::SITES[] Git porcelains: diff --git a/tig.1.txt b/tig.1.txt index aca40cb..b0cafd8 100644 --- a/tig.1.txt +++ b/tig.1.txt @@ -96,7 +96,7 @@ TIG_MAIN_CMD:: FILES ----- '~/.tigrc':: - User configuration file. See tigrc(5) for examples. + User configuration file. See gitlink:tigrc[5] for examples. '.git/config':: Repository config file. Read on startup with the help of @@ -115,6 +115,9 @@ the Free Software Foundation; either version 2 of the License, or SEE ALSO -------- + +- gitlink:tigrc[5] +- link:http://jonas.nitro.dk/tig/manual.html[The tig manual], - link:http://www.kernel.org/pub/software/scm/git/docs/[git(7)], - link:http://www.kernel.org/pub/software/scm/cogito/docs/[cogito(7)] diff --git a/web.conf b/web.conf deleted file mode 100644 index ed09fe8..0000000 --- a/web.conf +++ /dev/null @@ -1,7 +0,0 @@ -# No header or footers for README.html -[header] -
-

{doctitle}

- -[footer] -
-- 2.32.0.93.g670b81a890