From: Felipe Contreras <felipe.contreras@gmail.com>
To: git@vger.kernel.org
Cc: Andreas Krey <a.krey@gmx.de>, John Keeping <john@keeping.me.uk>,
Jeff King <peff@peff.net>, Richard Hansen <rhansen@bbn.com>,
Philip Oakley <philipoakley@iee.org>,
"brian m. carlson" <sandals@crustytoothpaste.net>,
Felipe Contreras <felipe.contreras@gmail.com>
Subject: Re: [PATCH v3 5/5] pull: add warning on non-ff merges
Date: Sun, 8 Sep 2013 20:49:23 -0500 [thread overview]
Message-ID: <CAMP44s0z2=-SEJD8=K31MBcuPx=Xx__6BKaqd-MmXjAVTOr7mQ@mail.gmail.com> (raw)
In-Reply-To: <1378689796-19305-6-git-send-email-felipe.contreras@gmail.com>
On Sun, Sep 8, 2013 at 8:23 PM, Felipe Contreras
<felipe.contreras@gmail.com> wrote:
> To prepare our uses for the upcoming changes we should warn them and let
> them know that they will need to specify a merge or a rebase in the
> future (when a non-fast-forward situation arises). Also, let them know
> we fallback to 'git pull --merge', so when the obsoletion of this mode
> comes, they know what to type without interrupting or changing their
> workflow.
>
> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
On top of this, we probably would want to update the documentation, so
the user can already read about what's going on when they type 'git
pull --help' as the warning suggests.
commit 60a2f5de7da2e119b858c7ab57b5f02cce9bdb9f
Author: Felipe Contreras <felipe.contreras@gmail.com>
Date: Sun Sep 8 20:40:21 2013 -0500
pull: add documentation about non-ff merges
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt
index 6d55737..d503924 100644
--- a/Documentation/git-pull.txt
+++ b/Documentation/git-pull.txt
@@ -23,6 +23,7 @@ More precisely, 'git pull' runs 'git fetch' with the given
parameters and calls 'git merge' to merge the retrieved branch
heads into the current branch.
With `--rebase`, it runs 'git rebase' instead of 'git merge'.
+With `--merge`, it forces the merge, even if it's non-fast forward.
<repository> should be the name of a remote repository as
passed to linkgit:git-fetch[1]. <refspec> can name an
@@ -41,9 +42,26 @@ Assume the following history exists and the current branch is
------------
A---B---C origin/master
/
+ D---E master
+------------
+
+Then `git pull` will merge in a fast-foward way up to the new master.
+
+------------
+ D---E---A---B---C master, origin/master
+------------
+
+However, a non-fast-foward case looks very different.
+
+------------
+ A---B---C origin/master
+ /
D---E---F---G master
------------
+In the future, `git pull` will fail on these situations, however, most likely
+you would want to force a merge, which you can do with `git pull --merge`.
+
Then "`git pull`" will fetch and replay the changes from the remote
`master` branch since it diverged from the local `master` (i.e., `E`)
until its current commit (`C`) on top of `master` and record the
--
Felipe Contreras
prev parent reply other threads:[~2013-09-09 1:49 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-09 1:23 [PATCH v3 0/5] Preparation for non-ff pulls by default Felipe Contreras
2013-09-09 1:23 ` [PATCH v3 1/5] pull: rename pull.rename to pull.mode Felipe Contreras
2013-09-09 21:23 ` Richard Hansen
2013-09-09 22:49 ` Felipe Contreras
2013-09-10 2:21 ` Jeff King
2013-09-10 6:46 ` Felipe Contreras
2013-09-10 6:52 ` Jeff King
2013-09-10 8:16 ` Matthieu Moy
2013-10-11 23:56 ` Felipe Contreras
2013-10-12 0:32 ` Richard Hansen
2013-10-12 0:50 ` Jeff King
2013-10-12 1:15 ` Felipe Contreras
2013-10-12 1:25 ` Jeff King
2013-10-12 2:08 ` Felipe Contreras
2013-10-12 4:40 ` Richard Hansen
2013-10-12 6:21 ` Felipe Contreras
2013-09-19 19:33 ` Richard Hansen
2013-10-11 23:54 ` Felipe Contreras
2013-09-10 21:34 ` Junio C Hamano
2013-09-09 1:23 ` [PATCH v3 2/5] pull: refactor $rebase variable into $mode Felipe Contreras
2013-09-09 1:23 ` [PATCH v3 3/5] pull: add --merge option Felipe Contreras
2013-09-09 1:23 ` [PATCH v3 4/5] pull: add merge-ff-only option Felipe Contreras
2013-09-09 1:23 ` [PATCH v3 5/5] pull: add warning on non-ff merges Felipe Contreras
2013-09-09 1:49 ` Felipe Contreras [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAMP44s0z2=-SEJD8=K31MBcuPx=Xx__6BKaqd-MmXjAVTOr7mQ@mail.gmail.com' \
--to=felipe.contreras@gmail.com \
--cc=a.krey@gmx.de \
--cc=git@vger.kernel.org \
--cc=john@keeping.me.uk \
--cc=peff@peff.net \
--cc=philipoakley@iee.org \
--cc=rhansen@bbn.com \
--cc=sandals@crustytoothpaste.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).