git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Document the --(no-)edit switch of git-revert and git-cherry-pick

From
Petr Baudis <pasky@suse.cz>
Date
Nov 26, 2005, 22:12 UTC
Message-ID
<20051126221244.5131.65509.stgit@machine.or.cz>

This switch was not documented properly. I decided not to mention the --no-edit switch in the git-cherry-pick documentation since we always default to no editing.

Signed-off-by: Petr Baudis <pasky@suse.cz>
---
 Documentation/git-cherry-pick.txt |    6 +++++-
 Documentation/git-revert.txt      |   11 ++++++++++-
 git-revert.sh                     |    4 ++--
 3 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/Documentation/git-cherry-pick.txt b/Documentation/git-cherry-pick.txt
index 26e0467..5e0ef5a 100644
--- a/Documentation/git-cherry-pick.txt
+++ b/Documentation/git-cherry-pick.txt
@@ -7,7 +7,7 @@ git-cherry-pick - Apply the change intro
 
 SYNOPSIS
 --------
-'git-cherry-pick' [-n] [-r] <commit>
+'git-cherry-pick' [--edit] [-n] [-r] <commit>
 
 DESCRIPTION
 -----------
@@ -20,6 +20,10 @@ OPTIONS
 <commit>::
 	Commit to cherry-pick.
 
+--edit::
+	With this option, `git-cherry-pick` will let you edit the commit
+	message prior committing.
+
 -r::
 	Usually the command appends which commit was
 	cherry-picked after the original commit message when
diff --git a/Documentation/git-revert.txt b/Documentation/git-revert.txt
index feebd81..f471037 100644
--- a/Documentation/git-revert.txt
+++ b/Documentation/git-revert.txt
@@ -7,7 +7,7 @@ git-revert - Revert an existing commit.
 
 SYNOPSIS
 --------
-'git-revert' [-n] <commit>
+'git-revert' [--edit | --no-edit] [-n] <commit>
 
 DESCRIPTION
 -----------
@@ -20,6 +20,15 @@ OPTIONS
 <commit>::
 	Commit to revert.
 
+--edit::
+	With this option, `git-revert` will let you edit the commit
+	message prior committing the revert. This is the default if
+	you run the command from a terminal.
+
+--no-edit::
+	With this option, `git-revert` will not start the commit
+	message editor.
+
 -n::
 	Usually the command automatically creates a commit with
 	a commit log message stating which commit was reverted.
diff --git a/git-revert.sh b/git-revert.sh
index c1aebb1..5cb02b1 100755
--- a/git-revert.sh
+++ b/git-revert.sh
@@ -19,10 +19,10 @@ esac
 usage () {
 	case "$me" in
 	cherry-pick)
-		die "usage git $me [-n] [-r] <commit-ish>"
+		die "usage git $me [--edit] [-n] [-r] <commit-ish>"
 		;;
 	revert)
-		die "usage git $me [-n] <commit-ish>"
+		die "usage git $me [--edit | --no-edit] [-n] <commit-ish>"
 		;;
 	esac
 }
Next: Petr Baudis
Message 1 of 3 in “Document the --(no-)edit switch of git-revert and git-cherry-pick”
  1. Document the --(no-)edit switch of git-revert and git-cherry-pickPetr Baudis, Nov 26, 2005
  2. Petr BaudisDec 5, 2005
  3. Junio C HamanoDec 5, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.