Re: [PATCH] transport-helper: enforce atomic in push_refs_with_push
- From
Emily Shaffer <emilyshaffer@google.com>
- Date
- Jul 3, 2019, 19:01 UTC
- Message-ID
- <20190703190118.GE121233@google.com>
- In-Reply-To
- <20190703185535.GC121233@google.com>
Show 28 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 && > > > + grep master output && > > > + grep allrefs output > > > +' > > > > I have the impression that the setup these two new test cases perform are > > _very_ similar, making it most likely that a combined test case would be > > more succinct, yet still complete and easily readable. > > (Junio replied to this downthread... I have more to ask too.)
Oops, I misremembered which comment he had replied to. Yeah, I'll think about this and reword.
Reroll to come shortly. Thanks, all.
- Emily