Skip to contentSkip to conversation

Documentation: Better explain git-commit --author implications

PATCH In review Abhijit Bhopatkar 2 participants 3 messages Jun 15, 2016 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Documentation: Better explain git-commit --author implications

'--author' changes the author name and email, but the documentation was not clear that it will not affect the '--signoff' option which will still use the user's name and email from the git settings.

---
 Documentation/git-commit.txt |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
Documentation/git-commit.txt +3 -1
index eb05b0f..17b69fa 100644
@@ -78,7 +78,8 @@ OPTIONS
 	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.
+	name is used. This has no effect on singoff line which will
+	still use commiter name and email .
 
 -m <msg>::
 --message=<msg>::
@@ -95,6 +96,7 @@ OPTIONS
 -s::
 --signoff::
 	Add Signed-off-by line at the end of the commit message.
+	'--author' option has no effect on this line.
 
 -n::
 --no-verify::
Signature · 1 line
1.5.6.3
#1 lore raw
Quoted 25 lines · Abhijit Bhopatkar

'--author' changes the author name and email, but the documentation was not clear that it will not affect the '--signoff' option which will still use the user's name and email from the git settings.

---
 Documentation/git-commit.txt |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
Documentation/git-commit.txt +2 -1
index eb05b0f..17b69fa 100644
@@ -78,7 +78,8 @@ OPTIONS
 	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.
+	name is used. This has no effect on singoff line which will
+	still use commiter name and email .
 
 -m <msg>::
 --message=<msg>::

Documentation/git-commit.txt OPTIONS · line 99

Quoted 4 lines
Documentation/git-commit.txt +1 -0
@@ -95,6 +96,7 @@ OPTIONS
 -s::
 --signoff::
 	Add Signed-off-by line at the end of the commit message.
+	'--author' option has no effect on this line.

I think it is much clearer if you do not say what does _not_ affect things, but instead say what does. So let's do this instead.

--signoff::
Add Signed-off-by line by the committer at the end of the commit log message.

And no other changes.

By making it clear that signoff is about the committer, it would be clear that --author (or GIT_AUTHOR_NAME environment variable) would not affect it.

#2 lore raw

PATCH 1/1 Documentation: Clarify '--signoff' for git-commit

'--signoff' uses commiter name always to add the signoff line, make it explicit in the documentation.

---
 Documentation/git-commit.txt |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
Documentation/git-commit.txt +2 -1
index eb05b0f..713ab0a 100644
@@ -94,7 +94,8 @@ OPTIONS
 
 -s::
 --signoff::
-	Add Signed-off-by line at the end of the commit message.
+	Add Signed-off-by line by the commiter at the end of the commit
+	log message.
 
 -n::
 --no-verify::
Signature · 1 line
1.5.6.3