Skip to content

Commit 3334729

Browse files
jaysoffiangitster
authored andcommitted
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. Signed-off-by: Jay Soffian <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e1e5ec8 commit 3334729

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Documentation/git-commit.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,11 @@ OPTIONS
9595
read the message from the standard input.
9696

9797
--author=<author>::
98-
Override the author name used in the commit. You can use the
99-
standard `A U Thor <[email protected]>` format. Otherwise,
100-
an existing commit that matches the given string and its author
101-
name is used.
98+
Override the commit author. Specify an explicit author using the
99+
standard `A U Thor <[email protected]>` format. Otherwise <author>
100+
is assumed to be a pattern and is used to search for an existing
101+
commit by that author (i.e. rev-list --all -i --author=<author>);
102+
the commit author is then copied from the first such commit found.
102103

103104
--date=<date>::
104105
Override the author date used in the commit.

0 commit comments

Comments
 (0)