From: Junio C Hamano Date: Wed, 5 Apr 2006 09:58:14 +0000 (-0700) Subject: Merge branches 'master' and 'jc/combine' into next X-Git-Tag: v1.3.0-rc4~40 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/b4196cf70a5fcd659fe334e5c03a416383f41985?ds=inline;hp=-c Merge branches 'master' and 'jc/combine' into next * master: Add git-clean command diff_flush(): leakfix. parse_date(): fix parsing 03/10/2006 * jc/combine: combine-diff: refactor built-in xdiff interface. --- b4196cf70a5fcd659fe334e5c03a416383f41985 diff --combined Makefile index c7d5ecf4f3,3367b8c13d,7030370c6f..3471177efb --- a/Makefile +++ b/Makefile @@@@ -114,7 -114,7 -114,7 +114,7 @@@@ SPARSE_FLAGS = -D__BIG_ENDIAN__ -D__pow SCRIPT_SH = \ git-add.sh git-bisect.sh git-branch.sh git-checkout.sh \ - - git-cherry.sh git-clone.sh git-commit.sh \ + + git-cherry.sh git-clean.sh git-clone.sh git-commit.sh \ git-count-objects.sh git-diff.sh git-fetch.sh \ git-format-patch.sh git-log.sh git-ls-remote.sh \ git-merge-one-file.sh git-parse-remote.sh \ @@@@ -208,7 -208,7 -208,7 +208,7 @@@@ LIB_OBJS = quote.o read-cache.o refs.o run-command.o \ server-info.o setup.o sha1_file.o sha1_name.o strbuf.o \ tag.o tree.o usage.o config.o environment.o ctype.o copy.o \ -- fetch-clone.o revision.o pager.o tree-walk.o \ ++ fetch-clone.o revision.o pager.o tree-walk.o xdiff-interface.o \ $(DIFF_OBJS) GITLIBS = $(LIB_FILE) $(XDIFF_LIB) @@@@ -513,11 -513,6 -513,6 +513,11 @@@@ exec_cmd.o: exec_cmd. http.o: http.c $(CC) -o $*.o -c $(ALL_CFLAGS) -DGIT_USER_AGENT='"git/$(GIT_VERSION)"' $< ++ifdef NO_EXPAT ++http-fetch.o: http-fetch.c ++ $(CC) -o $*.o -c $(ALL_CFLAGS) -DNO_EXPAT $< ++endif ++ git-%$X: %.o $(GITLIBS) $(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS) @@@@ -540,7 -535,7 -535,7 +540,7 @@@@ git-imap-send$X: imap-send.o $(LIB_FILE git-http-fetch$X: fetch.o http.o http-fetch.o $(LIB_FILE) $(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \ -- $(LIBS) $(CURL_LIBCURL) ++ $(LIBS) $(CURL_LIBCURL) $(EXPAT_LIBEXPAT) git-http-push$X: revision.o http.o http-push.o $(LIB_FILE) $(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \ diff --combined diff.c index 2db2cc568d,fe4664c53c,e496905bad..ce98a90805 --- a/diff.c +++ b/diff.c @@@@ -883,8 -883,6 -883,6 +883,8 @@@@ int diff_opt_parse(struct diff_options options->filter = arg + 14; else if (!strcmp(arg, "--pickaxe-all")) options->pickaxe_opts = DIFF_PICKAXE_ALL; ++ else if (!strcmp(arg, "--pickaxe-regex")) ++ options->pickaxe_opts = DIFF_PICKAXE_REGEX; else if (!strncmp(arg, "-B", 2)) { if ((options->break_opt = diff_scoreopt_parse(arg)) == -1) @@@@ -1282,28 -1280,34 -1280,28 +1282,34 @@@@ void diff_flush(struct diff_options *op for (i = 0; i < q->nr; i++) { struct diff_filepair *p = q->queue[i]; - - if ((diff_output_format == DIFF_FORMAT_NO_OUTPUT) || - - (p->status == DIFF_STATUS_UNKNOWN)) - - continue; - - if (p->status == 0) - - die("internal error in diff-resolve-rename-copy"); - - switch (diff_output_format) { - - case DIFF_FORMAT_PATCH: - - diff_flush_patch(p, options); - - break; - - case DIFF_FORMAT_RAW: - - case DIFF_FORMAT_NAME_STATUS: - - diff_flush_raw(p, line_termination, - - inter_name_termination, - - options); + + + + switch (p->status) { + + case DIFF_STATUS_UNKNOWN: break; - - case DIFF_FORMAT_NAME: - - diff_flush_name(p, - - inter_name_termination, - - line_termination); + + case 0: + + die("internal error in diff-resolve-rename-copy"); break; + + default: + + switch (diff_output_format) { + + case DIFF_FORMAT_PATCH: + + diff_flush_patch(p, options); + + break; + + case DIFF_FORMAT_RAW: + + case DIFF_FORMAT_NAME_STATUS: + + diff_flush_raw(p, line_termination, + + inter_name_termination, + + options); + + break; + + case DIFF_FORMAT_NAME: + + diff_flush_name(p, + + inter_name_termination, + + line_termination); + + break; + + case DIFF_FORMAT_NO_OUTPUT: + + break; + + } } - - diff_free_filepair(q->queue[i]); + + diff_free_filepair(p); } free(q->queue); q->queue = NULL;