Skip to contentSkip to conversation

commit.txt: clarify how --author argument is used

PATCH New Jay Soffian 1 participant 1 message Jun 15, 2016 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 commit.txt: clarify how --author argument is used

commit --author was added by 146ea06 (git commit --author=$name: look $name up in existing commits), but its documentation was sorely lacking compared to its excellent commit message. This commit tries to improve the documentation.

---
 Documentation/git-commit.txt |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
Documentation/git-commit.txt +5 -4
index 32c482f..c28603e 100644
@@ -95,10 +95,11 @@ OPTIONS
 	read the message from the standard input.
 
 --author=<author>::
-	Override the author name used in the commit.  You can use the
-	standard `A U Thor <[email protected]>` format.  Otherwise,
-	an existing commit that matches the given string and its author
-	name is used.
+	Override the commit author. Specify an explicit author using the
+	standard `A U Thor <[email protected]>` format. Otherwise <author>
+	is assumed to be a pattern and is used to search for an existing
+	commit by that author (i.e. rev-list --all -i --author=<author>);
+	the commit author is then copied from the first such commit found.
 
 --date=<date>::
 	Override the author date used in the commit.
Signature · 1 line
1.7.1