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 a...@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
mhag...@alum.mit.edu
http://softwareswirl.blogspot.com/
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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 a...@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.

Thanks,
-Brad

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html