From: Pranit Bauva Date: Tue, 22 Mar 2016 06:13:43 GMT Subject: Re: [PATCH] bisect--helper: convert a function in shell to C Message-ID: In-Reply-To: On Tue, Mar 22, 2016 at 11:40 AM, Christian Couder wrote: > On Tue, Mar 22, 2016 at 1:28 AM, Stefan Beller wrote: >> On Mon, Mar 21, 2016 at 12:00 PM, Pranit Bauva wrote: >>> Convert the code literally without changing its design even though it >>> seems that its obscure as to the use of comparing revision to different bisect >>> arguments which seems like a problem in shell because of the way >>> function arguments are handled. >> >> How would I use the C version instead of the shell version now? > > Hint: one can look at how other functions in builtin/bisect--helper.c are used. > >> I'd imagine you'd want to change calls in git-bisect.sh from >> check_term_format >> to be: >> git bisect--helper check_term_format > > Hint: to get a good idea of how the call should be, one can look at > the way "git-bisect.sh" already calls "git bisect--helper". > >> and "git bisect--helper" would then call the new static method? >> Once you have the C version working (do we need additional tests >> or can we rely on the test suite being enough for now?), >> you can also delete the shell version. Thanks a lot! I will dig more into this.