From: Junio C Hamano Date: Thu, 26 Mar 2009 06:49:26 GMT Subject: Re: [PATCH 09/10] bisect: implement "read_bisect_paths" to read paths in "$GIT_DIR/BISECT_NAMES" Message-ID: <7vwsacrd6x.fsf@gitster.siamese.dyndns.org> In-Reply-To: <20090326055559.743cb502.chriscool@tuxfamily.org> Christian Couder writes: > This is needed because "git bisect--helper" must read bisect paths > in "$GIT_DIR/BISECT_NAMES", so that a bisection can be performed only > on commits that touches paths in this file. > > Signed-off-by: Christian Couder Again, very nice. > bisect.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++--------- > 1 files changed, 47 insertions(+), 9 deletions(-) > > diff --git a/bisect.c b/bisect.c > index ce62696..a6fd826 100644 > --- a/bisect.c > +++ b/bisect.c > @@ -4,6 +4,7 @@ > #include "revision.h" > #include "refs.h" > #include "list-objects.h" > +#include "quote.h" > #include "bisect.h" > > > @@ -424,6 +425,33 @@ static int read_bisect_refs(void) > return for_each_bisect_ref(register_ref, NULL); > } > > +void read_bisect_paths() > +{ > + struct strbuf str = STRBUF_INIT; > + const char *filename = git_path("BISECT_NAMES"); > + FILE *fp = fp = fopen(filename, "r"); s/= fp //;