From 0dbc715ae0ccf0991d032173d86890a90bf94814 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 15 Jul 2022 14:32:18 -0700 Subject: doc: consolidate --rerere-autoupdate description The `--rerere-autoupdate` option is shared across 5 commands, and are described the same way because it works exactly the same way in these commands. Create a separate file and include it from the help pages for these commands, so that we can improve the description at one place to improve all of them at once, and keep them in sync. Signed-off-by: Junio C Hamano --- Documentation/git-am.txt | 5 +---- Documentation/git-cherry-pick.txt | 5 +---- Documentation/git-merge.txt | 5 +---- Documentation/git-rebase.txt | 5 +---- Documentation/git-revert.txt | 5 +---- Documentation/rerere-options.txt | 4 ++++ 6 files changed, 9 insertions(+), 20 deletions(-) create mode 100644 Documentation/rerere-options.txt diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt index 09107fb106..320da6c4f7 100644 --- a/Documentation/git-am.txt +++ b/Documentation/git-am.txt @@ -112,10 +112,7 @@ default. You can use `--no-utf8` to override this. am.threeWay configuration variable. For more information, see am.threeWay in linkgit:git-config[1]. ---rerere-autoupdate:: ---no-rerere-autoupdate:: - Allow the rerere mechanism to update the index with the - result of auto-conflict resolution if possible. +include::rerere-options.txt[] --ignore-space-change:: --ignore-whitespace:: diff --git a/Documentation/git-cherry-pick.txt b/Documentation/git-cherry-pick.txt index 78dcc9171f..1e8ac9df60 100644 --- a/Documentation/git-cherry-pick.txt +++ b/Documentation/git-cherry-pick.txt @@ -156,10 +156,7 @@ effect to your index in a row. Pass the merge strategy-specific option through to the merge strategy. See linkgit:git-merge[1] for details. ---rerere-autoupdate:: ---no-rerere-autoupdate:: - Allow the rerere mechanism to update the index with the - result of auto-conflict resolution if possible. +include::rerere-options.txt[] SEQUENCER SUBCOMMANDS --------------------- diff --git a/Documentation/git-merge.txt b/Documentation/git-merge.txt index 3125473cc1..fee1dc2df2 100644 --- a/Documentation/git-merge.txt +++ b/Documentation/git-merge.txt @@ -90,10 +90,7 @@ invocations. The automated message can include the branch description. If `--log` is specified, a shortlog of the commits being merged will be appended to the specified message. ---rerere-autoupdate:: ---no-rerere-autoupdate:: - Allow the rerere mechanism to update the index with the - result of auto-conflict resolution if possible. +include::rerere-options.txt[] --overwrite-ignore:: --no-overwrite-ignore:: diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index a872ab0fbd..ff0b643ec0 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@ -376,10 +376,7 @@ See also INCOMPATIBLE OPTIONS below. + See also INCOMPATIBLE OPTIONS below. ---rerere-autoupdate:: ---no-rerere-autoupdate:: - Allow the rerere mechanism to update the index with the - result of auto-conflict resolution if possible. +include::rerere-options.txt[] -S[]:: --gpg-sign[=]:: diff --git a/Documentation/git-revert.txt b/Documentation/git-revert.txt index 8463fe9cf7..0105a54c1a 100644 --- a/Documentation/git-revert.txt +++ b/Documentation/git-revert.txt @@ -112,10 +112,7 @@ effect to your index in a row. Pass the merge strategy-specific option through to the merge strategy. See linkgit:git-merge[1] for details. ---rerere-autoupdate:: ---no-rerere-autoupdate:: - Allow the rerere mechanism to update the index with the - result of auto-conflict resolution if possible. +include::rerere-options.txt[] --reference:: Instead of starting the body of the log message with "This diff --git a/Documentation/rerere-options.txt b/Documentation/rerere-options.txt new file mode 100644 index 0000000000..8f4849e272 --- /dev/null +++ b/Documentation/rerere-options.txt @@ -0,0 +1,4 @@ +--rerere-autoupdate:: +--no-rerere-autoupdate:: + Allow the rerere mechanism to update the index with the + result of auto-conflict resolution if possible. -- cgit v1.3-5-g45d5 From cb54fc93e4627d9496fff1c4ba18b1705802d069 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 3 Aug 2022 13:49:59 -0700 Subject: doc: clarify rerere-autoupdate The "--[no-]rerere-autoupdate" option controls what happens _after_ the rerere mechanism kicks in to reuse recorded resolutions and does not prevent from the rerere mechanism to trigger in the first place. It is unclear in the current text if "--no-rerere-autoupdate" stops the auto-resolution. Rewrite the sentence to clarify. Signed-off-by: Junio C Hamano --- Documentation/rerere-options.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Documentation/rerere-options.txt b/Documentation/rerere-options.txt index 8f4849e272..c3321ddea2 100644 --- a/Documentation/rerere-options.txt +++ b/Documentation/rerere-options.txt @@ -1,4 +1,9 @@ --rerere-autoupdate:: --no-rerere-autoupdate:: - Allow the rerere mechanism to update the index with the - result of auto-conflict resolution if possible. + After the rerere mechanism reuses a recorded resolution on + the current conflict to update the files in the working + tree, allow it to also update the index with the result of + resolution. `--no-rerere-autoupdate` is a good way to + double-check what `rerere` did and catch potential + mismerges, before committing the result to the index with a + separate `git add`. -- cgit v1.3-5-g45d5