Message ID | 20200717105406.82226-3-mirucam@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Finish converting git bisect to C part 2 | expand |
> Following 'enum bisect_error' vocabulary, return variable 'res' is > always non-positive. > Let's use '-res' instead of 'abs(res)' to make the code clearer. > Mentored-by: Christian Couder <chriscool@tuxfamily.org> > Signed-off-by: Miriam Rubio <mirucam@gmail.com> > Helped-by: Junio C Hamano <gitster@pobox.com> Although there is no set rule for this, but I think that your sign-off goes at the last generally. This is what I have seen on various patches.
Shourya Shukla <shouryashukla.oo@gmail.com> writes: >> Following 'enum bisect_error' vocabulary, return variable 'res' is >> always non-positive. >> Let's use '-res' instead of 'abs(res)' to make the code clearer. > >> Mentored-by: Christian Couder <chriscool@tuxfamily.org> >> Signed-off-by: Miriam Rubio <mirucam@gmail.com> >> Helped-by: Junio C Hamano <gitster@pobox.com> > > Although there is no set rule for this, but I think that your sign-off > goes at the last generally. This is what I have seen on various patches. It is most natural to list these entries in chronological order. Code was written while others helped, and the final seal on what gets sent out is stamped by appending the author's sign-off at the end. Thanks.
On 25/07/20 11:01PM, Shourya Shukla wrote: > > Following 'enum bisect_error' vocabulary, return variable 'res' is > > always non-positive. > > Let's use '-res' instead of 'abs(res)' to make the code clearer. > > > Mentored-by: Christian Couder <chriscool@tuxfamily.org> > > Signed-off-by: Miriam Rubio <mirucam@gmail.com> > > Helped-by: Junio C Hamano <gitster@pobox.com> > > Although there is no set rule for this, but I think that your sign-off > goes at the last generally. This is what I have seen on various patches. The rule of thumb I follow is to have these in chronological order. So Christian first mentored, then the patch was published so Junio helped next and finally you sign off the patch before sending it out so that comes last.
On 27/07/20 11:12AM, Pratyush Yadav wrote: > On 25/07/20 11:01PM, Shourya Shukla wrote: > > > Following 'enum bisect_error' vocabulary, return variable 'res' is > > > always non-positive. > > > Let's use '-res' instead of 'abs(res)' to make the code clearer. > > > > > Mentored-by: Christian Couder <chriscool@tuxfamily.org> > > > Signed-off-by: Miriam Rubio <mirucam@gmail.com> > > > Helped-by: Junio C Hamano <gitster@pobox.com> > > > > Although there is no set rule for this, but I think that your sign-off > > goes at the last generally. This is what I have seen on various patches. > > The rule of thumb I follow is to have these in chronological order. So > Christian first mentored, then the patch was published so Junio helped > next and finally you sign off the patch before sending it out so that > comes last. My MUA didn't download Junio's reply earlier for some reason. Sorry for the redundant message.
Pratyush Yadav <me@yadavpratyush.com> writes: > My MUA didn't download Junio's reply earlier for some reason. Sorry for > the redundant message. Mails cross all the time---you do not have to apologize.
diff --git a/builtin/bisect--helper.c b/builtin/bisect--helper.c index c452d3f6b7..0466b07a43 100644 --- a/builtin/bisect--helper.c +++ b/builtin/bisect--helper.c @@ -727,5 +727,5 @@ int cmd_bisect__helper(int argc, const char **argv, const char *prefix) if (res == BISECT_INTERNAL_SUCCESS_MERGE_BASE) res = BISECT_OK; - return abs(res); + return -res; }
Following 'enum bisect_error' vocabulary, return variable 'res' is always non-positive. Let's use '-res' instead of 'abs(res)' to make the code clearer. Mentored-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Miriam Rubio <mirucam@gmail.com> Helped-by: Junio C Hamano <gitster@pobox.com> --- builtin/bisect--helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)