Merge branch 'bp/sub-process-convert-filter'
authorJunio C Hamano <gitster@pobox.com>
Tue, 30 May 2017 02:16:42 +0000 (11:16 +0900)
committerJunio C Hamano <gitster@pobox.com>
Tue, 30 May 2017 02:16:42 +0000 (11:16 +0900)
Code from "conversion using external process" codepath has been
extracted to a separate sub-process.[ch] module.

* bp/sub-process-convert-filter:
convert: update subprocess_read_status() to not die on EOF
sub-process: move sub-process functions into separate files
convert: rename reusable sub-process functions
convert: update generic functions to only use generic data structures
convert: separate generic structures and variables from the filter specific ones
convert: split start_multi_file_filter() into two separate functions
pkt-line: annotate packet_writel with LAST_ARG_MUST_BE_NULL
convert: move packet_write_line() into pkt-line as packet_writel()
pkt-line: add packet_read_line_gently()
pkt-line: fix packet_read_line() to handle len < 0 errors
convert: remove erroneous tests for errno == EPIPE

1  2 
Makefile
diff --combined Makefile
index e35542e63181144397053bf7932fad2cf97027bb,add945b5603a74498a24a7a258bee063f2afaf55..2ed6db728a8479adf7df76d1525a50733fa013ae
+++ b/Makefile
@@@ -626,12 -626,10 +626,12 @@@ TEST_PROGRAMS_NEED_X += test-line-buffe
  TEST_PROGRAMS_NEED_X += test-match-trees
  TEST_PROGRAMS_NEED_X += test-mergesort
  TEST_PROGRAMS_NEED_X += test-mktemp
 +TEST_PROGRAMS_NEED_X += test-online-cpus
  TEST_PROGRAMS_NEED_X += test-parse-options
  TEST_PROGRAMS_NEED_X += test-path-utils
  TEST_PROGRAMS_NEED_X += test-prio-queue
  TEST_PROGRAMS_NEED_X += test-read-cache
 +TEST_PROGRAMS_NEED_X += test-ref-store
  TEST_PROGRAMS_NEED_X += test-regex
  TEST_PROGRAMS_NEED_X += test-revision-walking
  TEST_PROGRAMS_NEED_X += test-run-command
@@@ -639,7 -637,6 +639,7 @@@ TEST_PROGRAMS_NEED_X += test-scrap-cach
  TEST_PROGRAMS_NEED_X += test-sha1
  TEST_PROGRAMS_NEED_X += test-sha1-array
  TEST_PROGRAMS_NEED_X += test-sigchain
 +TEST_PROGRAMS_NEED_X += test-strcmp-offset
  TEST_PROGRAMS_NEED_X += test-string-list
  TEST_PROGRAMS_NEED_X += test-submodule-config
  TEST_PROGRAMS_NEED_X += test-subprocess
@@@ -817,7 -814,6 +817,7 @@@ LIB_OBJS += reflog-walk.
  LIB_OBJS += refs.o
  LIB_OBJS += refs/files-backend.o
  LIB_OBJS += refs/iterator.o
 +LIB_OBJS += refs/ref-cache.o
  LIB_OBJS += ref-filter.o
  LIB_OBJS += remote.o
  LIB_OBJS += replace_object.o
@@@ -842,6 -838,7 +842,7 @@@ LIB_OBJS += streaming.
  LIB_OBJS += string-list.o
  LIB_OBJS += submodule.o
  LIB_OBJS += submodule-config.o
+ LIB_OBJS += sub-process.o
  LIB_OBJS += symlinks.o
  LIB_OBJS += tag.o
  LIB_OBJS += tempfile.o
@@@ -1855,7 -1852,6 +1856,7 @@@ perl/perl.mak: perl/PM.stam
  
  perl/PM.stamp: FORCE
        @$(FIND) perl -type f -name '*.pm' | sort >$@+ && \
 +      $(PERL_PATH) -V >>$@+ && \
        { cmp $@+ $@ >/dev/null 2>/dev/null || mv $@+ $@; } && \
        $(RM) $@+
  
@@@ -2353,17 -2349,9 +2354,17 @@@ check: common-cmds.
  C_SOURCES = $(patsubst %.o,%.c,$(C_OBJ))
  %.cocci.patch: %.cocci $(C_SOURCES)
        @echo '    ' SPATCH $<; \
 +      ret=0; \
        for f in $(C_SOURCES); do \
 -              $(SPATCH) --sp-file $< $$f $(SPATCH_FLAGS); \
 -      done >$@ 2>$@.log; \
 +              $(SPATCH) --sp-file $< $$f $(SPATCH_FLAGS) || \
 +                      { ret=$$?; break; }; \
 +      done >$@+ 2>$@.log; \
 +      if test $$ret != 0; \
 +      then \
 +              cat $@.log; \
 +              exit 1; \
 +      fi; \
 +      mv $@+ $@; \
        if test -s $@; \
        then \
                echo '    ' SPATCH result: $@; \