Re: [PATCH v3] push --force-with-lease: Fix ref status reporting
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 28, 2016, 23:13 UTC
- Message-ID
- <xmqqmvrpl2lb.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <1454012898-10138-1-git-send-email-agwheeler@gmail.com>
Andrew Wheeler <agwheeler@gmail.com> writes:
Show 34 quoted lines
> diff --git a/t/t5533-push-cas.sh b/t/t5533-push-cas.sh > index c402d8d..c65033f 100755 > --- a/t/t5533-push-cas.sh > +++ b/t/t5533-push-cas.sh > @@ -101,7 +101,8 @@ test_expect_success 'push to update (allowed, tracking)' ' > ( > cd dst && > test_commit D && > - git push --force-with-lease=master origin master > + git push --force-with-lease=master origin master 2>err && > + ! grep "forced update" err > ) && > git ls-remote dst refs/heads/master >expect && > git ls-remote src refs/heads/master >actual && > @@ -114,7 +115,8 @@ test_expect_success 'push to update (allowed even though no-ff)' ' > cd dst && > git reset --hard HEAD^ && > test_commit D && > - git push --force-with-lease=master origin master > + git push --force-with-lease=master origin master 2>err && > + grep "forced update" err > ) && > git ls-remote dst refs/heads/master >expect && > git ls-remote src refs/heads/master >actual && > @@ -147,7 +149,8 @@ test_expect_success 'push to delete (allowed)' ' > setup_srcdst_basic && > ( > cd dst && > - git push --force-with-lease=master origin :master > + git push --force-with-lease=master origin :master 2>err && > + grep deleted err > ) && > >expect && > git ls-remote src refs/heads/master >actual &&
These all look OK (I am not sure about message i18n, though).
Do we not test a case where --force-with-lease push is rejected due to REF_STATUS_REJECT_STALE?
Thanks.