Re: [PATCH] update-ref: fail create operation over stdin if ref already exists
- From
Michael Haggerty <mhagger@alum.mit.edu>
- Date
- Apr 3, 2014, 13:20 UTC
- Message-ID
- <533D601E.8020301@alum.mit.edu>
- In-Reply-To
- <533C092B.1050801@kitware.com>
On 04/02/2014 02:57 PM, Brad King wrote:
Show 14 quoted lines
> On 04/02/2014 04:09 AM, Michael Haggerty wrote: >> From: Aman Gupta <aman@tmm1.net> > [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 ref fails when ref exists' ' > > Strictly speaking we should have a non-z mode test too.
This code path is used regardless of whether -z is used, so I don't think it is necessary to duplicate the test.
Michael
-- Michael Haggerty mhagger@alum.mit.edu http://softwareswirl.blogspot.com/