From: Petr Baudis Date: Sat, 26 Nov 2005 22:12:44 +0000 (+0100) Subject: Document the --(no-)edit switch of git-revert and git-cherry-pick X-Git-Tag: v0.99.9m^2~81 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=8bf14d6ef9245f3b81d24cb7725a868f62343277;p=git.git Document the --(no-)edit switch of git-revert and git-cherry-pick 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 Signed-off-by: Junio C Hamano --- diff --git a/Documentation/git-cherry-pick.txt b/Documentation/git-cherry-pick.txt index 26e04677..5e0ef5ae 100644 --- a/Documentation/git-cherry-pick.txt +++ b/Documentation/git-cherry-pick.txt @@ -7,7 +7,7 @@ git-cherry-pick - Apply the change introduced by an existing commit. SYNOPSIS -------- -'git-cherry-pick' [-n] [-r] +'git-cherry-pick' [--edit] [-n] [-r] DESCRIPTION ----------- @@ -20,6 +20,10 @@ OPTIONS :: 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 feebd81d..f471037b 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] +'git-revert' [--edit | --no-edit] [-n] DESCRIPTION ----------- @@ -20,6 +20,15 @@ OPTIONS :: 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 c1aebb15..5cb02b1e 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] " + die "usage git $me [--edit] [-n] [-r] " ;; revert) - die "usage git $me [-n] " + die "usage git $me [--edit | --no-edit] [-n] " ;; esac }