Merge branch 'fc/fast-export-fixes'
authorJunio C Hamano <gitster@pobox.com>
Sun, 6 Jan 2013 07:41:09 +0000 (23:41 -0800)
committerJunio C Hamano <gitster@pobox.com>
Sun, 6 Jan 2013 07:41:09 +0000 (23:41 -0800)
Various updates to fast-export used in the context of the remote
helper interface.

* fc/fast-export-fixes:
fast-export: make sure updated refs get updated
fast-export: don't handle uninteresting refs
fast-export: fix comparison in tests
fast-export: trivial cleanup
remote-testgit: implement the "done" feature manually
remote-testgit: report success after an import
remote-testgit: exercise more features
remote-testgit: cleanup tests
remote-testgit: remove irrelevant test
remote-testgit: remove non-local functionality
Add new simplified git-remote-testgit
Rename git-remote-testgit to git-remote-testpy
remote-helpers: fix failure message
remote-testgit: fix direction of marks
fast-export: avoid importing blob marks

1  2 
Makefile
diff --combined Makefile
index 186f127301dcbe8ddef72f9b9bf7f6a44917bc1d,68f1ac288b21c0ccb2d7f9e0c17913418a36977f..8e225cad7d510a1e113228cc9a2fdd47fad54a95
+++ b/Makefile
@@@ -74,14 -74,10 +74,14 @@@ all:
  # Define NO_D_TYPE_IN_DIRENT if your platform defines DT_UNKNOWN but lacks
  # d_type in struct dirent (Cygwin 1.5, fixed in Cygwin 1.7).
  #
 +# Define HAVE_STRINGS_H if you have strings.h and need it for strcasecmp.
 +#
  # Define NO_STRCASESTR if you don't have strcasestr.
  #
  # Define NO_MEMMEM if you don't have memmem.
  #
 +# Define NO_GETPAGESIZE if you don't have getpagesize.
 +#
  # Define NO_STRLCPY if you don't have strlcpy.
  #
  # Define NO_STRTOUMAX if you don't have both strtoimax and strtoumax in the
  # Define NO_POLL if you do not have or don't want to use poll().
  # This also implies NO_SYS_POLL_H.
  #
 +# Define NEEDS_SYS_PARAM_H if you need to include sys/param.h to compile,
 +# *PLEASE* REPORT to git@vger.kernel.org if your platform needs this;
 +# we want to know more about the issue.
 +#
  # Define NO_PTHREADS if you do not have or do not want to use Pthreads.
  #
  # Define NO_PREAD if you have a problem with pread() system call (e.g.
@@@ -382,7 -374,7 +382,7 @@@ htmldir = share/doc/git-do
  ETC_GITCONFIG = $(sysconfdir)/gitconfig
  ETC_GITATTRIBUTES = $(sysconfdir)/gitattributes
  lib = lib
 -# DESTDIR=
 +# DESTDIR =
  pathsep = :
  
  export prefix bindir sharedir sysconfdir gitwebdir localedir
@@@ -478,7 -470,7 +478,7 @@@ SCRIPT_PERL += git-relink.per
  SCRIPT_PERL += git-send-email.perl
  SCRIPT_PERL += git-svn.perl
  
- SCRIPT_PYTHON += git-remote-testgit.py
+ SCRIPT_PYTHON += git-remote-testpy.py
  SCRIPT_PYTHON += git-p4.py
  
  SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \
@@@ -583,9 -575,9 +583,9 @@@ endi
  export PERL_PATH
  export PYTHON_PATH
  
 -LIB_FILE=libgit.a
 -XDIFF_LIB=xdiff/lib.a
 -VCSSVN_LIB=vcs-svn/lib.a
 +LIB_FILE = libgit.a
 +XDIFF_LIB = xdiff/lib.a
 +VCSSVN_LIB = vcs-svn/lib.a
  
  LIB_H += xdiff/xinclude.h
  LIB_H += xdiff/xmacros.h
@@@ -1147,7 -1139,7 +1147,7 @@@ ifeq ($(uname_S),NetBSD
  endif
  ifeq ($(uname_S),AIX)
        DEFAULT_PAGER = more
 -      NO_STRCASESTR=YesPlease
 +      NO_STRCASESTR = YesPlease
        NO_MEMMEM = YesPlease
        NO_MKDTEMP = YesPlease
        NO_MKSTEMPS = YesPlease
        NO_NSEC = YesPlease
        FREAD_READS_DIRECTORIES = UnfortunatelyYes
        INTERNAL_QSORT = UnfortunatelyYes
 -      NEEDS_LIBICONV=YesPlease
 +      NEEDS_LIBICONV = YesPlease
        BASIC_CFLAGS += -D_LARGE_FILES
        ifeq ($(shell expr "$(uname_V)" : '[1234]'),1)
                NO_PTHREADS = YesPlease
                PTHREAD_LIBS = -lpthread
        endif
        ifeq ($(shell expr "$(uname_V).$(uname_R)" : '5\.1'),3)
 -              INLINE=''
 +              INLINE = ''
        endif
        GIT_TEST_CMP = cmp
  endif
  ifeq ($(uname_S),GNU)
        # GNU/Hurd
 -      NO_STRLCPY=YesPlease
 +      NO_STRLCPY = YesPlease
        NO_MKSTEMPS = YesPlease
        HAVE_PATHS_H = YesPlease
        LIBC_CONTAINS_LIBINTL = YesPlease
@@@ -1195,9 -1187,9 +1195,9 @@@ ifeq ($(uname_S),IRIX
        NEEDS_LIBGEN = YesPlease
  endif
  ifeq ($(uname_S),IRIX64)
 -      NO_SETENV=YesPlease
 +      NO_SETENV = YesPlease
        NO_UNSETENV = YesPlease
 -      NO_STRCASESTR=YesPlease
 +      NO_STRCASESTR = YesPlease
        NO_MEMMEM = YesPlease
        NO_MKSTEMPS = YesPlease
        NO_MKDTEMP = YesPlease
        NO_REGEX = YesPlease
        NO_FNMATCH_CASEFOLD = YesPlease
        SNPRINTF_RETURNS_BOGUS = YesPlease
 -      SHELL_PATH=/usr/gnu/bin/bash
 +      SHELL_PATH = /usr/gnu/bin/bash
        NEEDS_LIBGEN = YesPlease
  endif
  ifeq ($(uname_S),HP-UX)
        INLINE = __inline
 -      NO_IPV6=YesPlease
 -      NO_SETENV=YesPlease
 -      NO_STRCASESTR=YesPlease
 +      NO_IPV6 = YesPlease
 +      NO_SETENV = YesPlease
 +      NO_STRCASESTR = YesPlease
        NO_MEMMEM = YesPlease
        NO_MKSTEMPS = YesPlease
        NO_STRLCPY = YesPlease
@@@ -1361,7 -1353,6 +1361,7 @@@ ifeq ($(uname_S),NONSTOP_KERNEL
        # Added manually, see above.
        NEEDS_SSL_WITH_CURL = YesPlease
        HAVE_LIBCHARSET_H = YesPlease
 +      HAVE_STRINGS_H = YesPlease
        NEEDS_LIBICONV = YesPlease
        NEEDS_LIBINTL_BEFORE_LIBICONV = YesPlease
        NO_SYS_SELECT_H = UnfortunatelyYes
        MKDIR_WO_TRAILING_SLASH = YesPlease
        # RFE 10-120912-4693 submitted to HP NonStop development.
        NO_SETITIMER = UnfortunatelyYes
 -      SANE_TOOL_PATH=/usr/coreutils/bin:/usr/local/bin
 -      SHELL_PATH=/usr/local/bin/bash
 +      SANE_TOOL_PATH = /usr/coreutils/bin:/usr/local/bin
 +      SHELL_PATH = /usr/local/bin/bash
        # as of H06.25/J06.14, we might better use this
 -      #SHELL_PATH=/usr/coreutils/bin/bash
 +      #SHELL_PATH = /usr/coreutils/bin/bash
  endif
  ifneq (,$(findstring MINGW,$(uname_S)))
        pathsep = ;
        X = .exe
        SPARSE_FLAGS = -Wno-one-bit-signed-bitfield
  ifneq (,$(wildcard ../THIS_IS_MSYSGIT))
 -      htmldir=doc/git/html/
 +      htmldir = doc/git/html/
        prefix =
        INSTALL = /bin/install
        EXTLIBS += /mingw/lib/libz.a
        NO_CURL = YesPlease
  endif
  endif
 +ifeq ($(uname_S),QNX)
 +      COMPAT_CFLAGS += -DSA_RESTART=0
 +      HAVE_STRINGS_H = YesPlease
 +      NEEDS_SOCKET = YesPlease
 +      NO_FNMATCH_CASEFOLD = YesPlease
 +      NO_GETPAGESIZE = YesPlease
 +      NO_ICONV = YesPlease
 +      NO_MEMMEM = YesPlease
 +      NO_MKDTEMP = YesPlease
 +      NO_MKSTEMPS = YesPlease
 +      NO_NSEC = YesPlease
 +      NO_PTHREADS = YesPlease
 +      NO_R_TO_GCC_LINKER = YesPlease
 +      NO_STRCASESTR = YesPlease
 +      NO_STRLCPY = YesPlease
 +endif
  
  -include config.mak.autogen
  -include config.mak
@@@ -1584,7 -1559,7 +1584,7 @@@ els
                CURL_LIBCURL = -lcurl
        endif
        ifdef NEEDS_SSL_WITH_CURL
 -              CURL_LIBCURL += -lssl
 +              CURL_LIBCURL += -lssl
                ifdef NEEDS_CRYPTO_WITH_SSL
                        CURL_LIBCURL += -lcrypto
                endif
        REMOTE_CURL_NAMES = $(REMOTE_CURL_PRIMARY) $(REMOTE_CURL_ALIASES)
        PROGRAM_OBJS += http-fetch.o
        PROGRAMS += $(REMOTE_CURL_NAMES)
 -      curl_check := $(shell (echo 070908; curl-config --vernum) | sort -r | sed -ne 2p)
 +      curl_check := $(shell (echo 070908; curl-config --vernum) 2>/dev/null | sort -r | sed -ne 2p)
        ifeq "$(curl_check)" "070908"
                ifndef NO_EXPAT
                        PROGRAM_OBJS += http-push.o
@@@ -1680,9 -1655,6 +1680,9 @@@ endi
  ifdef NO_D_INO_IN_DIRENT
        BASIC_CFLAGS += -DNO_D_INO_IN_DIRENT
  endif
 +ifdef NO_GECOS_IN_PWENT
 +      BASIC_CFLAGS += -DNO_GECOS_IN_PWENT
 +endif
  ifdef NO_ST_BLOCKS_IN_STRUCT_STAT
        BASIC_CFLAGS += -DNO_ST_BLOCKS_IN_STRUCT_STAT
  endif
@@@ -1776,9 -1748,6 +1776,9 @@@ endi
  ifdef NO_SYS_POLL_H
        BASIC_CFLAGS += -DNO_SYS_POLL_H
  endif
 +ifdef NEEDS_SYS_PARAM_H
 +      BASIC_CFLAGS += -DNEEDS_SYS_PARAM_H
 +endif
  ifdef NO_INTTYPES_H
        BASIC_CFLAGS += -DNO_INTTYPES_H
  endif
@@@ -1799,7 -1768,7 +1799,7 @@@ ifdef OBJECT_CREATION_USES_RENAME
  endif
  ifdef NO_STRUCT_ITIMERVAL
        COMPAT_CFLAGS += -DNO_STRUCT_ITIMERVAL
 -      NO_SETITIMER=YesPlease
 +      NO_SETITIMER = YesPlease
  endif
  ifdef NO_SETITIMER
        COMPAT_CFLAGS += -DNO_SETITIMER
@@@ -1890,9 -1859,6 +1890,9 @@@ ifdef NO_MEMME
        COMPAT_CFLAGS += -DNO_MEMMEM
        COMPAT_OBJS += compat/memmem.o
  endif
 +ifdef NO_GETPAGESIZE
 +      COMPAT_CFLAGS += -DNO_GETPAGESIZE
 +endif
  ifdef INTERNAL_QSORT
        COMPAT_CFLAGS += -DINTERNAL_QSORT
        COMPAT_OBJS += compat/qsort.o
@@@ -1918,10 -1884,6 +1918,10 @@@ ifdef HAVE_LIBCHARSET_
        EXTLIBS += $(CHARSET_LIB)
  endif
  
 +ifdef HAVE_STRINGS_H
 +      BASIC_CFLAGS += -DHAVE_STRINGS_H
 +endif
 +
  ifdef HAVE_DEV_TTY
        BASIC_CFLAGS += -DHAVE_DEV_TTY
  endif
@@@ -1958,15 -1920,15 +1958,15 @@@ ifneq (,$(XDL_FAST_HASH)
  endif
  
  ifeq ($(TCLTK_PATH),)
 -NO_TCLTK=NoThanks
 +NO_TCLTK = NoThanks
  endif
  
  ifeq ($(PERL_PATH),)
 -NO_PERL=NoThanks
 +NO_PERL = NoThanks
  endif
  
  ifeq ($(PYTHON_PATH),)
 -NO_PYTHON=NoThanks
 +NO_PYTHON = NoThanks
  endif
  
  QUIET_SUBDIR0  = +$(MAKE) -C # space to separate -C and subdir
@@@ -2013,13 -1975,13 +2013,13 @@@ PROFILE_DIR := $(CURDIR
  ifeq ("$(PROFILE)","GEN")
        CFLAGS += -fprofile-generate=$(PROFILE_DIR) -DNO_NORETURN=1
        EXTLIBS += -lgcov
 -      export CCACHE_DISABLE=t
 -      V=1
 +      export CCACHE_DISABLE = t
 +      V = 1
  else
  ifneq ("$(PROFILE)","")
        CFLAGS += -fprofile-use=$(PROFILE_DIR) -fprofile-correction -DNO_NORETURN=1
 -      export CCACHE_DISABLE=t
 -      V=1
 +      export CCACHE_DISABLE = t
 +      V = 1
  endif
  endif
  
@@@ -2868,7 -2830,7 +2868,7 @@@ git.spec: git.spec.in GIT-VERSION-FIL
        sed -e 's/@@VERSION@@/$(GIT_VERSION)/g' < $< > $@+
        mv $@+ $@
  
 -GIT_TARNAME=git-$(GIT_VERSION)
 +GIT_TARNAME = git-$(GIT_VERSION)
  dist: git.spec git-archive$(X) configure
        ./git-archive --format=tar \
                --prefix=$(GIT_TARNAME)/ HEAD^{tree} > $(GIT_TARNAME).tar