Re: [PATCH] update-ref: fail create operation over stdin if ref already exists

2014-04-03 Thread Michael Haggerty
On 04/02/2014 02:57 PM, Brad King wrote: > On 04/02/2014 04:09 AM, Michael Haggerty wrote: >> From: Aman Gupta > [snip] >> @@ -147,6 +147,7 @@ static void parse_cmd_create(const char *next) >> struct ref_update *update; >> >> update = update_alloc(); >> +update->have_old = 1; > >

Re: [PATCH] update-ref: fail create operation over stdin if ref already exists

2014-04-02 Thread Brad King
On 04/02/2014 04:09 AM, Michael Haggerty wrote: > From: Aman Gupta [snip] > @@ -147,6 +147,7 @@ static void parse_cmd_create(const char *next) > struct ref_update *update; > > update = update_alloc(); > + update->have_old = 1; Looks good. > +test_expect_success 'stdin -z create

[PATCH] update-ref: fail create operation over stdin if ref already exists

2014-04-02 Thread Michael Haggerty
From: Aman Gupta Signed-off-by: Aman Gupta Signed-off-by: Michael Haggerty --- My colleague Aman ran across this bug and wrote the fix. I didn't notice this bug, but I just verified that it is also fixed by my mh/ref-transaction patch series (albeit without a test case). Because the bug could