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
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 p
131 Show the
132 .Cm blame
133 view for the version of the file in the currently selected line's commit's
134 parent commit.
135 .It Cm B
136 Switch the
137 .Cm blame
138 view back to the previously blamed commit.
139 .It Cm q
140 Quit the
141 .Cm diff
142 view.
143 .El
144 .Pp
145 The options for
146 .Cm tog blame
147 are as follows:
148 .Bl -tag -width Ds
149 .It Fl c Ar commit
150 Start traversing history at the specified
151 .Ar commit .
152 The expected argument is the name of a branch or a SHA1 hash which corresponds
153 to a commit object.
154 .El
155 .It Cm tree [ Fl c Ar commit ] [ Ar repository-path ]
156 Display the repository tree.
157 If the
158 .Ar repository path
159 is omitted, assume the repository is located in the current working directory.
160 .Pp
161 The key bindings for
162 .Cm tog tree
163 are as follows:
164 .Bl -tag -width Ds
165 .It Cm Down-arrow, j, Page-down
166 Move the selection cursor down.
167 .It Cm Up-arrow, k, Page-up
168 Move the selection cursor up.
169 .It Cm Enter
170 Enter the currently selected directory, or switch to the
171 .Cm blame
172 view for the currently selected file.
173 .It Cm Backspace
174 Move back to the parent directory.
175 .It Cm i
176 Show the object IDs for all objects displayed in the
177 .Cm tree
178 view.
179 .El
180 .Pp
181 The options for
182 .Cm tog tree
183 are as follows:
184 .Bl -tag -width Ds
185 .It Fl c Ar commit
186 Start traversing history at the specified
187 .Ar commit .
188 The expected argument is the name of a branch or a SHA1 hash which corresponds
189 to a commit object.
190 .El
191 .El
192 .Sh EXIT STATUS
193 .Ex -std tog
194 .Sh SEE ALSO
195 .Xr got-repository 5
196 .Sh AUTHORS
197 .An Stefan Sperling Aq Mt stsp@openbsd.org