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

Re: [PATCH] push: allow atomic flag via configuration

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 27, 2017, 16:59 UTC
Message-ID
<xmqq7f3a3bbg.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<CACBZZX7HAg89htqPgkFd+ks-E7fcgAWfQ9n9qRj-YM88tj3t-A@mail.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 38 quoted lines
> On Fri, Mar 24, 2017 at 6:17 PM, Romuald Brunet <romuald@chivil.com> wrote:
>> +test_expect_success 'atomic option possible via git-config' '
>> +       # prepare the repo
>> +       mk_repo_pair &&
>> +       (
>> +               cd workbench &&
>> +               test_commit one &&
>> +               git checkout -b second master &&
>> +               test_commit two &&
>> +               git push --mirror up
>> +       ) &&
>> +       # a third party modifies the server side:
>> +       (
>> +               cd upstream &&
>> +               git checkout second &&
>> +               git tag test_tag second
>> +       ) &&
>> +       # see if we can now push both branches.
>> +       (
>> +               cd workbench &&
>> +               git config push.atomic true &&
>> +               git checkout master &&
>> +               test_commit three &&
>> +               git checkout second &&
>> +               test_commit four &&
>> +               git tag test_tag &&
>> +               test_must_fail git push --tags up master second
>> +       ) &&
>> +       test_refs master HEAD@{3} &&
>> +       test_refs second HEAD@{1}
>> +'
>> +
>
> Sent my earlier E-Mail too soon, so I missed this, there's no test
> here for what "git config push.atomic false" && "git push --atomic"
> does, is that atomic or not? I.e. what does "git -c push.atomic=false
> push --atomic" do? Does the CLI option override the config as it
> should?
Good points.  Thanks for reading and reviewing the tests carefully.
Previous: Ævar Arnfjörð Bjarmason
Message 10 of 10 in “push: allow atomic flag via configuration”
  1. push: allow atomic flag via configurationRomuald Brunet, Mar 24, 2017
  2. Jeff KingMar 24, 2017
  3. Jonathan NiederMar 24, 2017
  4. Jeff KingMar 24, 2017
  5. Junio C HamanoMar 24, 2017
  6. Romuald BrunetMar 27, 2017
  7. Jonathan NiederMar 28, 2017
  8. Ævar Arnfjörð BjarmasonMar 27, 2017
  9. Ævar Arnfjörð BjarmasonMar 27, 2017
  10. Junio C HamanoMar 27, 2017

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.