From 129260cbd42f2a9fb40055ac6ed32c7b75a5ec05 Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth <sschuberth@gmail.com> Date: Thu, 26 Mar 2015 21:11:21 +0100 Subject: [PATCH 1/2] docs: clarify "preserve" option wording for git-pull The "also" sounds as if "preserve" does a rebase as an additional step that "true" would not do, but that is not the case. Clarify this by omitting "also", and rewording the sentence a bit. Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> --- Documentation/git-pull.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt index 200eb222600..4064452b066 100644 --- a/Documentation/git-pull.txt +++ b/Documentation/git-pull.txt @@ -111,9 +111,8 @@ include::merge-options.txt[] was rebased since last fetched, the rebase uses that information to avoid rebasing non-local changes. + -When preserve, also rebase the current branch on top of the upstream -branch, but pass `--preserve-merges` along to `git rebase` so that -locally created merge commits will not be flattened. +When set to preserve, rebase with the `--preserve-merges` option passed +to `git rebase` so that locally created merge commits will not be flattened. + When false, merge the current branch into the upstream branch. + From d50d31e8808261eccfa6bde826e5e63368e29573 Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth <sschuberth@gmail.com> Date: Mon, 30 Mar 2015 11:29:46 +0200 Subject: [PATCH 2/2] docs: clarify what git-rebase's "-p" / "--preserve-merges" does Ignoring a merge can be read as ignoring the changes a merge commit introduces altogether, as if the entire side branch the merge commit merged was removed from the history. But that is not what happens if "-p" is not specified. What happens is that the individual commits a merge commit introduces are replayed in order, and only any possible merge conflict resolutions or manual amendments to the merge commit are ignored. Get this straight in the docs. Also, do not say that merge commits are *tried* to be recreated. As that is true almost everywhere it is better left unsaid. Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> --- Documentation/git-rebase.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index 2a93c645bdb..be15b768711 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@ -358,7 +358,9 @@ unless the `--fork-point` option is specified. -p:: --preserve-merges:: - Instead of ignoring merges, try to recreate them. + Recreate merge commits instead of flattening the history by replaying + commits a merge commit introduces. Merge conflict resolutions or manual + amendments to merge commits are not preserved. + This uses the `--interactive` machinery internally, but combining it with the `--interactive` option explicitly is generally not a good