Firstly, sorry for the delay, I wasn't working for national holiday from
the 4th til yesterday.
> If I were tasked with developing this further, I would try to move as much
> of the setup into the initial test case (if there is already a `setup`
> test case; otherwise I would create one). In fact,
Hi Emily,
On Wed, 3 Jul 2019, Emily Shaffer wrote:
> On Wed, Jul 03, 2019 at 09:41:46PM +0200, Johannes Schindelin wrote:
>
> > On Wed, 3 Jul 2019, Emily Shaffer wrote:
> >
> > > > > + up="$HTTPD_URL"/smart/atomic-branches.git &&
> > > > > + test_commit atomic1 &&
> > > > > + test_com
On Wed, Jul 03, 2019 at 09:41:46PM +0200, Johannes Schindelin wrote:
> Hi Emily,
>
> On Wed, 3 Jul 2019, Emily Shaffer wrote:
>
> > > > + up="$HTTPD_URL"/smart/atomic-branches.git &&
> > > > + test_commit atomic1 &&
> > > > + test_commit atomic2 &&
> > > > + git push "$up"
Hi Emily,
On Wed, 3 Jul 2019, Emily Shaffer wrote:
> > > + up="$HTTPD_URL"/smart/atomic-branches.git &&
> > > + test_commit atomic1 &&
> > > + test_commit atomic2 &&
> > > + git push "$up" master &&
> >
> > It would be more succinct to do a `git clone --bare . "$d"` here, instead
> > of a `git in
> > > > +'
> > > +
> > > +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"
On Wed, Jul 03, 2019 at 11:13:45AM -0700, Junio C Hamano wrote:
> SZEDER Gábor writes:
>
> > On Tue, Jul 02, 2019 at 02:37:42PM -0700, Junio C Hamano wrote:
> >> > +test_expect_success 'push --atomic shows all failed refs' '
> >> > +# Make up/master, up/allrefs
> >> > +d=$HTTPD_DO
> > +test_expect_success 'push --atomic also prevents branch creation' '
> > + # Make up/master
> > + d=$HTTPD_DOCUMENT_ROOT_PATH/atomic-branches.git &&
> > + git init --bare "$d" &&
> > + git --git-dir="$d" config http.receivepack true &&
>
> Why not `-C "$d"`?
The example I had found bel
SZEDER Gábor writes:
> On Tue, Jul 02, 2019 at 02:37:42PM -0700, Junio C Hamano wrote:
>> > +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 -
On Tue, Jul 02, 2019 at 02:37:42PM -0700, Junio C Hamano wrote:
> > +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.
On Tue, Jul 02, 2019 at 02:37:42PM -0700, Junio C Hamano wrote:
> >
> > +test_expect_success 'push --atomic also prevents branch creation' '
> > + # Make up/master
> > + d=$HTTPD_DOCUMENT_ROOT_PATH/atomic-branches.git &&
> > + git init --bare "$d" &&
> > + git --git-dir="$d" config http.r
On Tue, Jul 02, 2019 at 01:16:46PM -0700, Junio C Hamano wrote:
> Emily Shaffer writes:
>
> > + if ((flags & TRANSPORT_PUSH_ATOMIC) && err) {
> > + for (struct ref *it = remote_refs; it; it = it->next)
> > + switch (it->status) {
> > +
Emily Shaffer writes:
> Teach transport-helper how to notice if skipping a ref during push would
> violate atomicity on the client side. We notice that a ref would be
> rejected, and choose not to send it, but don't notice that if the client
> has asked for --atomic we are violating atomicity if
Emily Shaffer writes:
> + if ((flags & TRANSPORT_PUSH_ATOMIC) && err) {
> + for (struct ref *it = remote_refs; it; it = it->next)
> + switch (it->status) {
> + case REF_STATUS_NONE:
> +
Emily Shaffer writes:
> diff --git a/transport-helper.c b/transport-helper.c
> index c7e17ec9cb..6b05a88faf 100644
> --- a/transport-helper.c
> +++ b/transport-helper.c
> @@ -853,6 +853,7 @@ static int push_refs_with_push(struct transport
> *transport,
> {
> int force_all = flags & TRANSP
Johannes Schindelin writes:
>> +# Make master incompatible with up/master
>> +git reset --hard HEAD^ &&
>> +# Add a new branch
>> +git branch atomic &&
>> +# --atomic should roll back creation of up/atomic
>> +test_must_fail git push --atomic "$up" master atomic &&
>> +
Hi Emily,
On Mon, 1 Jul 2019, Emily Shaffer wrote:
> Teach transport-helper how to notice if skipping a ref during push would
> violate atomicity on the client side. We notice that a ref would be
> rejected, and choose not to send it, but don't notice that if the client
> has asked for --atomic w
Teach transport-helper how to notice if skipping a ref during push would
violate atomicity on the client side. We notice that a ref would be
rejected, and choose not to send it, but don't notice that if the client
has asked for --atomic we are violating atomicity if all the other
pushes we are send
17 matches
Mail list logo