Blob


1 .\"
2 .\" Copyright (c) 2018 Stefan Sperling
3 .\"
4 .\" Permission to use, copy, modify, and distribute this software for any
5 .\" purpose with or without fee is hereby granted, provided that the above
6 .\" copyright notice and this permission notice appear in all copies.
7 .\"
8 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 .\"
16 .Dd $Mdocdate$
17 .Dt TOG 1
18 .Os
19 .Sh NAME
20 .Nm tog
21 .Nd git repository browser
22 .Sh SYNOPSIS
23 .Nm
24 .Ar command
25 .Op Fl h
26 .Op Ar arg ...
27 .Sh DESCRIPTION
28 .Nm
29 is an interactive read-only browser for git repositories.
30 This repository format is described in
31 .Xr got-repository 5 .
32 .Pp
33 .Nm
34 provides global and command-specific options.
35 Global options must preceed the command name, and are as follows:
36 .Bl -tag -width tenletters
37 .It Fl h
38 Display usage information.
39 .El
40 .Pp
41 The commands for
42 .Nm
43 are as follows:
44 .Bl -tag -width blame
45 .It Cm log [ Fl c Ar commit ] [ Ar repository-path ]
46 Display history of a repository.
47 If the
48 .Ar repository path
49 is omitted, assume the repository is located in the current working directory.
50 .Pp
51 This command is also executed if no explicit command is specified.
52 .Pp
53 The key bindings for
54 .Cm tog log
55 are as follows:
56 .Bl -tag -width Ds
57 .It Cm Down-arrow, j, Page-down
58 Move the selection cursor down.
59 .It Cm Up-arrow, k, Page-up
60 Move the selection cursor up.
61 .It Cm Enter
62 Switch to the
63 .Cm diff
64 view showing file changes made in the currently selected commit.
65 .It Cm t
66 Switch to the
67 .Cm tree
68 view showing the tree for the currently selected commit.
69 .It Cm q
70 Quit the
71 .Cm log
72 view.
73 .El
74 .Pp
75 The options for
76 .Cm tog log
77 are as follows:
78 .Bl -tag -width Ds
79 .It Fl c Ar commit
80 Start traversing history at the specified
81 .Ar commit .
82 The expected argument is the name of a branch or a SHA1 hash which corresponds
83 to a commit object.
84 .El
85 .It Cm diff [ Ar repository-path ] Ar object1 Ar object2
86 Display the differences between two objects in the repository.
87 Each
88 .Ar object
89 argument is a SHA1 hash which corresponds to the object.
90 Both objects must be of the same type (blobs, trees, or commits).
91 If the
92 .Ar repository path
93 is omitted, use the current working directory.
94 .Pp
95 The key bindings for
96 .Cm tog diff
97 are as follows:
98 .Bl -tag -width Ds
99 .It Cm Down-arrow, j, Page-down, Space, Enter
100 Scroll down.
101 .It Cm Up-arrow, k, Page-up, Backspace
102 Scroll up.
103 .It Cm q
104 Quit the
105 .Cm diff
106 view.
107 .El
108 .It Cm blame [ Fl c Ar commit ] [ Ar repository-path ] Ar path
109 Display line-by-line history of a file at the specified path.
110 If the
111 .Ar repository path
112 is omitted, assume the repository is located in the current working directory.
113 .Pp
114 The key bindings for
115 .Cm tog blame
116 are as follows:
117 .Bl -tag -width Ds
118 .It Cm Down-arrow, j, Page-down, Space
119 Move the selection cursor down.
120 .It Cm Up-arrow, k, Page-up, Backspace
121 Move the selection cursor up.
122 .It Cm Enter
123 Switch to the
124 .Cm diff
125 view for the currently selected line's commit.
126 .It Cm b
127 Show the
128 .Cm blame
129 view for the version of the file in the currently selected line's commit.
130 .It Cm B
131 Switch the
132 .Cm blame
133 view back to the previously blamed commit.
134 .It Cm q
135 Quit the
136 .Cm diff
137 view.
138 .El
139 .Pp
140 The options for
141 .Cm tog blame
142 are as follows:
143 .Bl -tag -width Ds
144 .It Fl c Ar commit
145 Start traversing history at the specified
146 .Ar commit .
147 The expected argument is the name of a branch or a SHA1 hash which corresponds
148 to a commit object.
149 .El
150 .It Cm tree [ Fl c Ar commit ] [ Ar repository-path ]
151 Display the repository tree.
152 If the
153 .Ar repository path
154 is omitted, assume the repository is located in the current working directory.
155 .Pp
156 The key bindings for
157 .Cm tog tree
158 are as follows:
159 .Bl -tag -width Ds
160 .It Cm Down-arrow, j, Page-down
161 Move the selection cursor down.
162 .It Cm Up-arrow, k, Page-up
163 Move the selection cursor up.
164 .It Cm Enter
165 Enter the currently selected directory, or switch to the
166 .Cm blame
167 view for the currently selected file.
168 .It Cm Backspace
169 Move back to the parent directory.
170 .It Cm i
171 Show the object IDs for all objects displayed in the
172 .Cm tree
173 view.
174 .El
175 .Pp
176 The options for
177 .Cm tog tree
178 are as follows:
179 .Bl -tag -width Ds
180 .It Fl c Ar commit
181 Start traversing history at the specified
182 .Ar commit .
183 The expected argument is the name of a branch or a SHA1 hash which corresponds
184 to a commit object.
185 .El
186 .El
187 .Sh EXIT STATUS
188 .Ex -std tog
189 .Sh SEE ALSO
190 .Xr got-repository 5
191 .Sh AUTHORS
192 .An Stefan Sperling Aq Mt stsp@openbsd.org