Skip to content

Commit 56ca12a

Browse files
committed
Replace 'option' by more specific terms where needed for '--pretty'
1 parent 30347a5 commit 56ca12a

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

book/02-git-basics/sections/viewing-history.asc

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,9 @@ It also puts a summary of the information at the end.
132132

133133
Another really useful option is `--pretty`.
134134
This option changes the log output to formats other than the default.
135-
A few prebuilt options are available for you to use.
136-
The `oneline` option prints each commit on a single line, which is useful if you're looking at a lot of commits.
137-
In addition, the `short`, `full`, and `fuller` options show the output in roughly the same format but with less or more information, respectively:
135+
A few prebuilt option values are available for you to use.
136+
The `oneline` value for this option prints each commit on a single line, which is useful if you're looking at a lot of commits.
137+
In addition, the `short`, `full`, and `fuller` values show the output in roughly the same format but with less or more information, respectively:
138138

139139
[source,console]
140140
----
@@ -144,7 +144,7 @@ ca82a6dff817ec66f44342007202690a93763949 Change version number
144144
a11bef06a3f659402fe7563abf99ad00de2209e6 Initial commit
145145
----
146146

147-
The most interesting option is `format`, which allows you to specify your own log output format.
147+
The most interesting option value is `format`, which allows you to specify your own log output format.
148148
This is especially useful when you're generating output for machine parsing -- because you specify the format explicitly, you know it won't change with updates to Git:(((log formatting)))
149149

150150
[source,console]
@@ -155,36 +155,36 @@ ca82a6d - Scott Chacon, 6 years ago : Change version number
155155
a11bef0 - Scott Chacon, 6 years ago : Initial commit
156156
----
157157

158-
<<pretty_format>> lists some of the more useful options that `format` takes.
158+
<<pretty_format>> lists some of the more useful specifiers that `format` takes.
159159

160160
[[pretty_format]]
161-
.Useful options for `git log --pretty=format`
161+
.Useful specifiers for `git log --pretty=format`
162162
[cols="1,4",options="header"]
163163
|================================
164-
| Option | Description of Output
165-
| `%H` | Commit hash
166-
| `%h` | Abbreviated commit hash
167-
| `%T` | Tree hash
168-
| `%t` | Abbreviated tree hash
169-
| `%P` | Parent hashes
170-
| `%p` | Abbreviated parent hashes
171-
| `%an` | Author name
172-
| `%ae` | Author email
173-
| `%ad` | Author date (format respects the --date=option)
174-
| `%ar` | Author date, relative
175-
| `%cn` | Committer name
176-
| `%ce` | Committer email
177-
| `%cd` | Committer date
178-
| `%cr` | Committer date, relative
179-
| `%s` | Subject
164+
| Specifier | Description of Output
165+
| `%H` | Commit hash
166+
| `%h` | Abbreviated commit hash
167+
| `%T` | Tree hash
168+
| `%t` | Abbreviated tree hash
169+
| `%P` | Parent hashes
170+
| `%p` | Abbreviated parent hashes
171+
| `%an` | Author name
172+
| `%ae` | Author email
173+
| `%ad` | Author date (format respects the --date=option)
174+
| `%ar` | Author date, relative
175+
| `%cn` | Committer name
176+
| `%ce` | Committer email
177+
| `%cd` | Committer date
178+
| `%cr` | Committer date, relative
179+
| `%s` | Subject
180180
|================================
181181

182182
You may be wondering what the difference is between _author_ and _committer_.
183183
The author is the person who originally wrote the work, whereas the committer is the person who last applied the work.
184184
So, if you send in a patch to a project and one of the core members applies the patch, both of you get credit -- you as the author, and the core member as the committer.
185185
We'll cover this distinction a bit more in <<ch05-distributed-git#ch05-distributed-git>>.
186186

187-
The `oneline` and `format` options are particularly useful with another `log` option called `--graph`.
187+
The `oneline` and `format` option values are particularly useful with another `log` option called `--graph`.
188188
This option adds a nice little ASCII graph showing your branch and merge history:
189189

190190
[source,console]
@@ -220,7 +220,7 @@ Those are only some simple output-formatting options to `git log` -- there are m
220220
| `--abbrev-commit` | Show only the first few characters of the SHA-1 checksum instead of all 40.
221221
| `--relative-date` | Display the date in a relative format (for example, ``2 weeks ago'') instead of using the full date format.
222222
| `--graph` | Display an ASCII graph of the branch and merge history beside the log output.
223-
| `--pretty` | Show commits in an alternate format. Options include oneline, short, full, fuller, and format (where you specify your own format).
223+
| `--pretty` | Show commits in an alternate format. Option values include oneline, short, full, fuller, and format (where you specify your own format).
224224
| `--oneline` | Shorthand for `--pretty=oneline --abbrev-commit` used together.
225225
|================================
226226

0 commit comments

Comments
 (0)