Re: [PATCH] push: allow atomic flag via configuration
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Mar 27, 2017, 09:33 UTC
- Message-ID
- <CACBZZX7HAg89htqPgkFd+ks-E7fcgAWfQ9n9qRj-YM88tj3t-A@mail.gmail.com>
- In-Reply-To
- <1490375874.745.227.camel@locke.gandi.net>
On Fri, Mar 24, 2017 at 6:17 PM, Romuald Brunet <romuald@chivil.com> wrote:
Show 31 quoted lines
> +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?