forked from git/git
-
Notifications
You must be signed in to change notification settings - Fork 146
Closed
Description
According to Documentation/SubmittingPatches,
[[commit-reference]]
If you want to reference a previous commit in the history of a stable
branch, use the format "abbreviated sha1 (subject, date)",
with the subject enclosed in a pair of double-quotes, like this:
....
Commit f86a374 ("pack-bitmap.c: fix a memleak", 2015-03-30)
noticed that ...
....
The "Copy commit summary" command of gitk can be used to obtain this
format, or this invocation of `git show`:
....
git show -s --date=short --pretty='format:%h ("%s", %ad)' <commit>
....
But why must we manually enter this format? It seems commonplace enough that we should be able to specify something like git show -s --pretty=summary
and it'll do the same thing.
One thing to consider: can we override the configured date settings? If a user doesn't provide a --date option, can we automatically assume --date=short?
dscho
Metadata
Metadata
Assignees
Labels
No labels