From: "Elijah Newren via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Alex Henrie <alexhenrie24@gmail.com>,
Phillip Wood <phillip.wood123@gmail.com>,
Son Luong Ngoc <sluongng@gmail.com>,
Elijah Newren <newren@gmail.com>
Subject: [PATCH 0/5] Handle conflicting pull options
Date: Thu, 15 Jul 2021 02:40:44 +0000 [thread overview]
Message-ID: <pull.1047.git.git.1626316849.gitgitgadget@gmail.com> (raw)
We've recently discussed how to handle conflicting configuration and command
line options in git pull, including at least a few different
proposals[1][2][3] to handle different subsets of the possibilities. We also
have a user report from someone who had conflicting configuration and got
surprised when one of the options overruled the other -- with no warning
from the command or the documentation that such would happen. Here's my
attempt to impose clear and simple rules, which can be seen in the commit
message of the third patch.
(The first two patches are just preparatory changes to make patch 3 easier
to read.)
Since the handling of conflicting options was holding up two of Alex's
patches[4][5], I also include those two patches at the end of my series,
though I've made quite a few changes and additions to the latter of those.
Possible areas of concern:
* Documentation/git-pull.txt includes merge-options.txt. While git-rebase
supports many of those "merge" options, I suspect there are others that
it does not support. We are probably silently ignoring those unsupported
options whenever one of those is specified at the same time a rebase is
requested; we should instead likely error out and report the
incompatibility. I have not yet addressed that, as I was focused on the
main rebase vs. merge incompatibility and default warning/error
associated with it.
[1]
https://lore.kernel.org/git/00e246b1-c712-e6a5-5c27-89127d796098@gmail.com/
[2] https://lore.kernel.org/git/xmqq8s2b489p.fsf@gitster.g/ [3]
https://lore.kernel.org/git/CABPp-BERS0iiiVhSsSs6dkqzBVTQgwJUjjKaZQEzRDGRUdObcQ@mail.gmail.com/
[4]
https://lore.kernel.org/git/20210711012604.947321-1-alexhenrie24@gmail.com/
[5]
https://lore.kernel.org/git/20210627000855.530985-1-alexhenrie24@gmail.com/
Alex Henrie (1):
pull: abort if --ff-only is given and fast-forwarding is impossible
Elijah Newren (4):
pull: move definitions of parse_config_rebase and parse_opt_rebase
pull: convert OPT_PASSTHRU for fast-forward options to OPT_CALLBACK
pull: handle conflicting rebase/merge options via last option wins
pull: abort by default when fast-forwarding is not possible
Documentation/config/pull.txt | 3 +-
Documentation/git-pull.txt | 19 +++--
advice.c | 5 ++
advice.h | 1 +
builtin/merge.c | 2 +-
builtin/pull.c | 144 ++++++++++++++++++++--------------
t/t4013-diff-various.sh | 2 +-
t/t5520-pull.sh | 20 ++---
t/t5521-pull-options.sh | 4 +-
t/t5524-pull-msg.sh | 4 +-
t/t5553-set-upstream.sh | 14 ++--
t/t5604-clone-reference.sh | 4 +-
t/t6402-merge-rename.sh | 18 ++---
t/t6409-merge-subtree.sh | 6 +-
t/t6417-merge-ours-theirs.sh | 10 +--
t/t7601-merge-pull-config.sh | 97 ++++++++++++++++++++++-
t/t7603-merge-reduce-heads.sh | 2 +-
17 files changed, 242 insertions(+), 113 deletions(-)
base-commit: 75ae10bc75336db031ee58d13c5037b929235912
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1047%2Fnewren%2Fhandle-conflicting-pull-options-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1047/newren/handle-conflicting-pull-options-v1
Pull-Request: https://github.com/git/git/pull/1047
--
gitgitgadget
next reply other threads:[~2021-07-15 2:40 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-15 2:40 Elijah Newren via GitGitGadget [this message]
2021-07-15 2:40 ` [PATCH 1/5] pull: move definitions of parse_config_rebase and parse_opt_rebase Elijah Newren via GitGitGadget
2021-07-15 2:40 ` [PATCH 2/5] pull: convert OPT_PASSTHRU for fast-forward options to OPT_CALLBACK Elijah Newren via GitGitGadget
2021-07-15 2:40 ` [PATCH 3/5] pull: handle conflicting rebase/merge options via last option wins Elijah Newren via GitGitGadget
2021-07-15 4:59 ` Eric Sunshine
2021-07-15 17:13 ` Elijah Newren
2021-07-15 9:44 ` Felipe Contreras
2021-07-15 17:33 ` Junio C Hamano
2021-07-15 17:46 ` Felipe Contreras
2021-07-15 19:04 ` Elijah Newren
2021-07-15 19:58 ` Junio C Hamano
2021-07-15 20:40 ` Elijah Newren
2021-07-15 21:12 ` Junio C Hamano
2021-07-16 18:39 ` Elijah Newren
2021-07-16 21:18 ` Junio C Hamano
2021-07-16 21:56 ` Felipe Contreras
2021-07-15 20:17 ` Junio C Hamano
2021-07-15 20:38 ` Elijah Newren
2021-07-15 2:40 ` [PATCH 4/5] pull: abort if --ff-only is given and fast-forwarding is impossible Alex Henrie via GitGitGadget
2021-07-15 2:40 ` [PATCH 5/5] pull: abort by default when fast-forwarding is not possible Elijah Newren via GitGitGadget
2021-07-15 5:18 ` Eric Sunshine
2021-07-15 16:56 ` Elijah Newren
2021-07-15 9:48 ` Felipe Contreras
2021-07-16 9:32 ` Ævar Arnfjörð Bjarmason
2021-07-16 18:13 ` Felipe Contreras
2021-07-15 9:37 ` [PATCH 0/5] Handle conflicting pull options Felipe Contreras
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=pull.1047.git.git.1626316849.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=alexhenrie24@gmail.com \
--cc=git@vger.kernel.org \
--cc=newren@gmail.com \
--cc=phillip.wood123@gmail.com \
--cc=sluongng@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.