git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] pull: abort by default if fast-forwarding is impossible

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Jun 28, 2021, 10:31 UTC
Message-ID
<87k0megtlo.fsf@evledraar.gmail.com>
In-Reply-To
<60d8edbb3803f_70e20886@natae.notmuch>
On Sun, Jun 27 2021, Felipe Contreras wrote:
Show 31 quoted lines
> Alex Henrie wrote:
>
>> On Sat, Jun 26, 2021 at 10:12 PM Felipe Contreras
>> <felipe.contreras@gmail.com> wrote:
>> >
>> > Also, a bunch of tests are broken after this change:
>> >
>> >   t4013-diff-various.sh
>> >   t5521-pull-options.sh
>> >   t5524-pull-msg.sh
>> >   t5520-pull.sh
>> >   t5553-set-upstream.sh
>> >   t5604-clone-reference.sh
>> >   t6409-merge-subtree.sh
>> >   t6402-merge-rename.sh
>> >   t6417-merge-ours-theirs.sh
>> >   t7601-merge-pull-config.sh
>> >   t7603-merge-reduce-heads.sh
>> >
>> > If you didn't mean this patch to be applied then perhaps add the RFC
>> > prefix.
>> 
>> I actually did run `make test` before sending the patch, but when so
>> many seemingly unrelated tests failed, I foolishly assumed that they
>> were pre-existing failures. I should have run the tests on master for
>> comparison, sorry. Or at least put "RFC" in the subject instead of
>> "PATCH" as you suggest. I sincerely apologize for my lack of due
>> diligence and I know that I need to do better at self-reviewing
>> patches before sending them.
> I personally don't see any need for apologies, we all make mistakes,
> just keep it in mind for the future.

Yes, for someone joining the project it's not obvious what the status of the tests is. No problem.

Alex: To elaborate, our exists tests should pass, and should pass on
every commit (both as a matter of fact and future coding practice). We
also have CI, so if you e.g. have a fork of git/git and push to your
fork you'll find that CI is run for you on several platforms.
See below for a one-liner to possibly speed up the testing for you.
> Personally I prefer to run prove instead, because the output is less
> verbose, and there's a nice summary at the end:
>
>   prove t[0-9][0-9][0-9][0-9]-*.sh

I also like "prove" better (well, I added the support for it, so ...). It's generally better to use e.g.:

    make test DEFAULT_TEST_TARGET=prove GIT_PROVE_OPTS="--jobs $(nproc)"

Since we do some basic checking via the Makefile that effectively form a part of our tests.

FWIW for your one-liner it can be just:
    prove t[0-9]*.sh
Alex: You might also find that if you specify --root as the path to a
ramdisk the tests are much faster, e.g. on my Linux boxes I set
--root=/run/user/`id -u`/git.
Previous: Felipe ContrerasNext: Felipe Contreras
Message 8 of 10 in “pull: abort by default if fast-forwarding is impossible”
  1. pull: abort by default if fast-forwarding is impossibleAlex Henrie, Jun 27, 2021
  2. Elijah NewrenJun 27, 2021
  3. Felipe ContrerasJun 27, 2021
  4. Elijah NewrenJun 27, 2021
  5. Felipe ContrerasJun 27, 2021
  6. Alex HenrieJun 27, 2021
  7. Felipe ContrerasJun 27, 2021
  8. Ævar Arnfjörð BjarmasonJun 28, 2021
  9. Felipe ContrerasJun 28, 2021
  10. Felipe ContrerasJun 27, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.