diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-10-20 10:28:44 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-10-29 00:15:39 -0700 |
commit | 361cb52383fb986f76a34506bdec9a1dd11133f0 (patch) | |
tree | bafea74882456172c9ed5982cce4d549e31c4360 /t/t4013/diff.show_--stat_side | |
parent | Git 2.33.1 (diff) | |
download | tgif-361cb52383fb986f76a34506bdec9a1dd11133f0.tar.xz |
pull: --ff-only should make it a noop when already-up-to-date
Earlier, we made sure that "git pull --ff-only" (and "git -c
pull.ff=only pull") errors out when our current HEAD is not an
ancestor of the tip of the history we are merging, but the condition
to trigger the error was implemented incorrectly.
Imagine you forked from a remote branch, built your history on top
of it, and then attempted to pull from them again. If they have not
made any update in the meantime, our current HEAD is obviously not
their ancestor, and this new error triggers.
Without the --ff-only option, we just report that there is no need
to pull; we did the same historically with --ff-only, too.
Make sure we do not fail with the recently added check to restore
the historical behaviour.
Reported-by: Kenneth Arnold <ka37@calvin.edu>
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4013/diff.show_--stat_side')
0 files changed, 0 insertions, 0 deletions