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 git-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 ] [ Fl r Ar repository-path ] [ path ]
46 Display history of a repository.
47 If a
48 .Ar path
49 is specified, show only commits which modified this path.
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 .It Fl r Ar repository-path
85 Use the repository at the specified path.
86 If not specified, assume the repository is located at or above the current
87 working directory.
88 .El
89 .It Cm diff [ Ar repository-path ] Ar object1 Ar object2
90 Display the differences between two objects in the repository.
91 Each
92 .Ar object
93 argument is a SHA1 hash which corresponds to the object.
94 Both objects must be of the same type (blobs, trees, or commits).
95 If the
96 .Ar repository path
97 is omitted, use the current working directory.
98 .Pp
99 The key bindings for
100 .Cm tog diff
101 are as follows:
102 .Bl -tag -width Ds
103 .It Cm Down-arrow, j, Page-down, Space
104 Scroll down.
105 .It Cm Up-arrow, k, Page-up, Backspace
106 Scroll up.
107 .It Cm q
108 Quit the
109 .Cm diff
110 view.
111 .El
112 .It Cm blame [ Fl c Ar commit ] [ Fl r Ar repository-path ] Ar path
113 Display line-by-line history of a file at the specified path.
114 .Pp
115 The key bindings for
116 .Cm tog blame
117 are as follows:
118 .Bl -tag -width Ds
119 .It Cm Down-arrow, j, Page-down, Space
120 Move the selection cursor down.
121 .It Cm Up-arrow, k, Page-up, Backspace
122 Move the selection cursor up.
123 .It Cm Enter
124 Switch to the
125 .Cm diff
126 view for the currently selected line's commit.
127 .It Cm b
128 Show the
129 .Cm blame
130 view for the version of the file in the currently selected line's commit.
131 .It Cm p
132 Show the
133 .Cm blame
134 view for the version of the file in the currently selected line's commit's
135 parent commit.
136 .It Cm B
137 Switch the
138 .Cm blame
139 view back to the previously blamed commit.
140 .It Cm q
141 Quit the
142 .Cm blame
143 view.
144 .El
145 .Pp
146 The options for
147 .Cm tog blame
148 are as follows:
149 .Bl -tag -width Ds
150 .It Fl c Ar commit
151 Start traversing history at the specified
152 .Ar commit .
153 The expected argument is the name of a branch or a SHA1 hash which corresponds
154 to a commit object.
155 .It Fl r Ar repository-path
156 Use the repository at the specified path.
157 If not specified, assume the repository is located at or above the current
158 working directory.
159 .El
160 .It Cm tree [ Fl c Ar commit ] [ Ar repository-path ]
161 Display the repository tree.
162 If the
163 .Ar repository path
164 is omitted, assume the repository is located in the current working directory.
165 .Pp
166 The key bindings for
167 .Cm tog tree
168 are as follows:
169 .Bl -tag -width Ds
170 .It Cm Down-arrow, j, Page-down
171 Move the selection cursor down.
172 .It Cm Up-arrow, k, Page-up
173 Move the selection cursor up.
174 .It Cm Enter
175 Enter the currently selected directory, or switch to the
176 .Cm blame
177 view for the currently selected file.
178 .It Cm l
179 Switch to the
180 .Cm log
181 view for the currently selected tree entry.
182 .It Cm Backspace
183 Move back to the parent directory.
184 .It Cm i
185 Show the object IDs for all objects displayed in the
186 .Cm tree
187 view.
188 .El
189 .Pp
190 The options for
191 .Cm tog tree
192 are as follows:
193 .Bl -tag -width Ds
194 .It Fl c Ar commit
195 Start traversing history at the specified
196 .Ar commit .
197 The expected argument is the name of a branch or a SHA1 hash which corresponds
198 to a commit object.
199 .El
200 .El
201 .Sh EXIT STATUS
202 .Ex -std tog
203 .Sh SEE ALSO
204 .Xr git-repository 5
205 .Sh AUTHORS
206 .An Stefan Sperling Aq Mt stsp@openbsd.org