git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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/
Previous: Brad King
Message 3 of 3 in “update-ref: fail create operation over stdin if ref already exists”
  1. update-ref: fail create operation over stdin if ref already existsMichael Haggerty, Apr 2, 2014
  2. Brad KingApr 2, 2014
  3. Michael HaggertyApr 3, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.