Re: [PATCH 8/9] merge-recursive: switch to returning errors instead of dying

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Junio,

On Wed, 29 Jun 2016, Junio C Hamano wrote:

> Johannes Schindelin <johannes.schindelin@xxxxxx> writes:
> 
> > @@ -743,6 +741,8 @@ static int update_file_flags(struct merge_options *o,
> >  			      int update_cache,
> >  			      int update_wd)
> > ...
> > +			ret = error_errno(_("do not know what to do with %06o %s '%s'"),
> > +				mode, sha1_to_hex(sha), path);
> >  free_buf:
> 
> OK, with a few more users of this label, it no longer looks so
> strange to me to have this label here.
> 
> At least, match the indentation level to the existing one we see
> below, though?

Okay, fixed.

Although I have to say that I do not quite understand the meaning of the
one-space indentation, in particular since the later "error_return" label
lacks it.

> >  		free(buf);
> >  	}
> >   update_index:
> > [...]
> > @@ -1861,7 +1867,7 @@ static int process_entry(struct merge_options *o,
> >  		 */
> >  		remove_file(o, 1, path, !a_mode);
> >  	} else
> > -		die(_("Fatal merge failure, shouldn't happen."));
> > +		return error(_("Fatal merge failure, shouldn't happen."));
> 
> Isn't this BUG()?

I guess it is! Fixed.

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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]