Re: [PATCH] transport-helper: enforce atomic in push_refs_with_push
- From
SZEDER Gábor <szeder.dev@gmail.com>
- Date
- Jul 3, 2019, 09:10 UTC
- Message-ID
- <20190703091030.GP21574@szeder.dev>
- In-Reply-To
- <xmqqa7dw2k49.fsf@gitster-ct.c.googlers.com>
On Tue, Jul 02, 2019 at 02:37:42PM -0700, Junio C Hamano wrote:
Show 24 quoted lines
> > +test_expect_success 'push --atomic shows all failed refs' ' > > + # Make up/master, up/allrefs > > + d=$HTTPD_DOCUMENT_ROOT_PATH/atomic-failed-refs.git && > > + git init --bare "$d" && > > + git --git-dir="$d" config http.receivepack true && > > + up="$HTTPD_URL"/smart/atomic-failed-refs.git && > > + test_commit allrefs1 && > > + test_commit allrefs2 && > > + git branch allrefs && > > + git push "$up" master allrefs && > > + # Make master and allrefs incompatible with up/master, up/allrefs > > + git checkout allrefs && > > + git reset --hard HEAD^ && > > + git checkout master && > > + git reset --hard HEAD^ && > > + # --atomic should complain about both master and allrefs > > + test_must_fail git push --atomic "$up" master allrefs >&output && > > Don't rely on ">&output", which is an unnecessary bash-ism here. It > breaks test run under shells like dash. > > >output 2>&1 > > should be OK.
'2>output' would be a tad better, because those refs should be printed to stderr.