Re: [PATCH 1/2] t1404: add a bunch of tests of D/F conflicts

2017-10-29 Thread brian m. carlson
On Sun, Oct 29, 2017 at 09:05:44AM +0900, Junio C Hamano wrote: > In short, unless you are a binary packager on a platform whose > native shell is ksh and who refuses to depend on tools that are not > default/native on the platform, you'd be OK? Yes. > > I'd recommend an explicit test for this.

Re: [PATCH 1/2] t1404: add a bunch of tests of D/F conflicts

2017-10-28 Thread Junio C Hamano
"brian m. carlson" writes: > There is discussion in the Austin Group issue tracker about adding this > feature to POSIX, but it's gotten bogged down over lexical versus > dynamic scoping. Everyone agrees that it's a desirable feature, though. > ... In short,

Re: [PATCH 1/2] t1404: add a bunch of tests of D/F conflicts

2017-10-28 Thread brian m. carlson
On Wed, Oct 25, 2017 at 11:32:51PM -0700, Jeff King wrote: > On Wed, Oct 25, 2017 at 10:03:09AM +0200, Michael Haggerty wrote: > > > > Yeah. It's supported by dash and many other shells, but we do try to > > > avoid it[1]. I think in this case we could just drop it (but keep > > > setting the

Re: [PATCH 1/2] t1404: add a bunch of tests of D/F conflicts

2017-10-26 Thread Jeff King
On Wed, Oct 25, 2017 at 10:03:09AM +0200, Michael Haggerty wrote: > > Yeah. It's supported by dash and many other shells, but we do try to > > avoid it[1]. I think in this case we could just drop it (but keep > > setting the "local foo" ones to empty with "foo=". > > I do wish that we could

Re: [PATCH 1/2] t1404: add a bunch of tests of D/F conflicts

2017-10-25 Thread Michael Haggerty
On 10/25/2017 10:03 AM, Michael Haggerty wrote: > On 10/24/2017 09:46 PM, Jeff King wrote: >> On Tue, Oct 24, 2017 at 12:19:26PM -0400, Eric Sunshine wrote: >> >>> On Tue, Oct 24, 2017 at 11:16 AM, Michael Haggerty >>> wrote: diff --git a/t/t1404-update-ref-errors.sh

Re: [PATCH 1/2] t1404: add a bunch of tests of D/F conflicts

2017-10-25 Thread Michael Haggerty
On 10/24/2017 09:46 PM, Jeff King wrote: > On Tue, Oct 24, 2017 at 12:19:26PM -0400, Eric Sunshine wrote: > >> On Tue, Oct 24, 2017 at 11:16 AM, Michael Haggerty >> wrote: >>> diff --git a/t/t1404-update-ref-errors.sh b/t/t1404-update-ref-errors.sh >>> @@ -34,6 +34,86 @@

Re: [PATCH 1/2] t1404: add a bunch of tests of D/F conflicts

2017-10-24 Thread Jeff King
On Tue, Oct 24, 2017 at 12:19:26PM -0400, Eric Sunshine wrote: > On Tue, Oct 24, 2017 at 11:16 AM, Michael Haggerty > wrote: > > diff --git a/t/t1404-update-ref-errors.sh b/t/t1404-update-ref-errors.sh > > @@ -34,6 +34,86 @@ test_update_rejected () { > > +# Test adding and

Re: [PATCH 1/2] t1404: add a bunch of tests of D/F conflicts

2017-10-24 Thread Eric Sunshine
On Tue, Oct 24, 2017 at 11:16 AM, Michael Haggerty wrote: > diff --git a/t/t1404-update-ref-errors.sh b/t/t1404-update-ref-errors.sh > @@ -34,6 +34,86 @@ test_update_rejected () { > +# Test adding and deleting D/F-conflicting references in a single > +# transaction. >

[PATCH 1/2] t1404: add a bunch of tests of D/F conflicts

2017-10-24 Thread Michael Haggerty
It is currently not allowed, in a single transaction, to add one reference and delete another reference if the two reference names D/F conflict with each other (e.g., like `refs/foo/bar` and `refs/foo`). The reason is that the code would need to take locks $GIT_DIR/refs/foo.lock