@matheusbsbs / matheus-bagliano / commits / 8bd867ee0e
Fork 0

Documentation/git-cherry-pick.txt et al.: Fix misleading -n description

The manual page of git-cherry-pick and git-revert asserts that -n works primarily on the working tree, while in fact the primary object it operates on is the index, and the changes only "accidentally" propagate to the working tree. This e.g. leads innocent #git IRC folks to believe that you can use -n to prepare changes for git-add -i staging. Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Petr Baudis committed Jul 16, 2008 at 14:35 UTC 8bd867ee0e9714457e5ea973849b0025f3e99efc
2 files changed +13 -13
Documentation/git-cherry-pick.txt
+5 -5
@@ -58,14 +58,14 @@ OPTIONS
58 Usually the command automatically creates a commit with
59 a commit log message stating which commit was
60 cherry-picked. This flag applies the change necessary
61 - to cherry-pick the named commit to your working tree,
62 - but does not make the commit. In addition, when this
63 - option is used, your working tree does not have to match
61 + to cherry-pick the named commit to your working tree
62 + and the index, but does not make the commit. In addition,
63 + when this option is used, your index does not have to match
64 the HEAD commit. The cherry-pick is done against the
65 - beginning state of your working tree.
65 + beginning state of your index.
66 +
67 This is useful when cherry-picking more than one commits'
68 -effect to your working tree in a row.
68 +effect to your index in a row.
69
70 -s::
71 --signoff::
Documentation/git-revert.txt
+8 -8
@@ -43,16 +43,16 @@ OPTIONS
43 -n::
44 --no-commit::
45 Usually the command automatically creates a commit with
46 - a commit log message stating which commit was reverted.
47 - This flag applies the change necessary to revert the
48 - named commit to your working tree, but does not make the
49 - commit. In addition, when this option is used, your
50 - working tree does not have to match the HEAD commit.
51 - The revert is done against the beginning state of your
52 - working tree.
46 + a commit log message stating which commit was
47 + reverted. This flag applies the change necessary
48 + to revert the named commit to your working tree
49 + and the index, but does not make the commit. In addition,
50 + when this option is used, your index does not have to match
51 + the HEAD commit. The revert is done against the
52 + beginning state of your index.
53 +
54 This is useful when reverting more than one commits'
55 -effect to your working tree in a row.
55 +effect to your index in a row.
56
57 -s::
58 --signoff::