Re: [PATCH 13/13] Build in merge

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

 



Junio C Hamano wrote:
> Miklos Vajna <vmiklos@xxxxxxxxxxxxxx> writes:

>> +             if (!remote_head)
>> +                     die("%s - not something we can merge", argv[0]);
>> +             update_ref("initial pull", "HEAD", remote_head->sha1, NULL, 0,
>> +                             DIE_ON_ERR);
>> +             reset_hard(remote_head->sha1, 0);
>> +             return 0;
> 
> Makes one wonder reset_hard() (aka "read-tree --reset -u HEAD") ever fail
> and return here (iow, without calling die()).  The answer is luckily no
> in this case, but it is somewhat unnerving to reviewers.

Do we have some guidelines on how to mark such non-returning calls,
or how to mark unreachable code (splint, formerly lclint, uses for
this /*@ unreachable @*/ annotation)?
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git


--
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]

  Powered by Linux