Merge branch 'mh/string-list'
authorJunio C Hamano <gitster@pobox.com>
Mon, 17 Sep 2012 22:53:31 +0000 (15:53 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 17 Sep 2012 22:53:31 +0000 (15:53 -0700)
* mh/string-list:
api-string-list.txt: initialize the string_list the easy way
string_list: add a function string_list_longest_prefix()
string_list: add a new function, string_list_remove_duplicates()
string_list: add a new function, filter_string_list()
string_list: add two new functions for splitting strings
string_list: add function string_list_append_nodup()

1  2 
.gitignore
Makefile
diff --combined .gitignore
index 68fe464090606b95b40b8b99e2454edb52862abe,0ca7df8e02147ebe9b23bdadbf97c26a274836db..a188a82bb1d6ab080c434a7096bd263545169f3c
  /test-mktemp
  /test-parse-options
  /test-path-utils
 +/test-regex
  /test-revision-walking
  /test-run-command
  /test-sha1
  /test-sigchain
+ /test-string-list
  /test-subprocess
  /test-svn-fe
  /common-cmds.h
diff --combined Makefile
index 56301dc0a80db5085400436bab3346f2dbdd5321,ebbb381c1942bb0b80375ab1b2b15af3bfa32d7f..a49d1db2889e7724f48eb81fc1fb3215e8e28a91
+++ b/Makefile
@@@ -90,8 -90,6 +90,8 @@@ all:
  #
  # Define NO_MKDTEMP if you don't have mkdtemp in the C library.
  #
 +# Define MKDIR_WO_TRAILING_SLASH if your mkdir() can't deal with trailing slash.
 +#
  # Define NO_MKSTEMPS if you don't have mkstemps in the C library.
  #
  # Define NO_STRTOK_R if you don't have strtok_r in the C library.
  # Define NO_PREAD if you have a problem with pread() system call (e.g.
  # cygwin1.dll before v1.5.22).
  #
 +# Define NO_SETITIMER if you don't have setitimer()
 +#
 +# Define NO_STRUCT_ITIMERVAL if you don't have struct itimerval
 +# This also implies NO_SETITIMER
 +#
  # Define NO_THREAD_SAFE_PREAD if your pread() implementation is not
  # thread-safe. (e.g. compat/pread.c or cygwin)
  #
@@@ -503,12 -496,12 +503,13 @@@ TEST_PROGRAMS_NEED_X += test-mergesor
  TEST_PROGRAMS_NEED_X += test-mktemp
  TEST_PROGRAMS_NEED_X += test-parse-options
  TEST_PROGRAMS_NEED_X += test-path-utils
 +TEST_PROGRAMS_NEED_X += test-regex
  TEST_PROGRAMS_NEED_X += test-revision-walking
  TEST_PROGRAMS_NEED_X += test-run-command
  TEST_PROGRAMS_NEED_X += test-scrap-cache-tree
  TEST_PROGRAMS_NEED_X += test-sha1
  TEST_PROGRAMS_NEED_X += test-sigchain
+ TEST_PROGRAMS_NEED_X += test-string-list
  TEST_PROGRAMS_NEED_X += test-subprocess
  TEST_PROGRAMS_NEED_X += test-svn-fe
  
@@@ -1647,10 -1640,6 +1648,10 @@@ ifdef NO_MKDTEM
        COMPAT_CFLAGS += -DNO_MKDTEMP
        COMPAT_OBJS += compat/mkdtemp.o
  endif
 +ifdef MKDIR_WO_TRAILING_SLASH
 +      COMPAT_CFLAGS += -DMKDIR_WO_TRAILING_SLASH
 +      COMPAT_OBJS += compat/mkdir.o
 +endif
  ifdef NO_MKSTEMPS
        COMPAT_CFLAGS += -DNO_MKSTEMPS
  endif
@@@ -1682,13 -1671,6 +1683,13 @@@ endi
  ifdef OBJECT_CREATION_USES_RENAMES
        COMPAT_CFLAGS += -DOBJECT_CREATION_MODE=1
  endif
 +ifdef NO_STRUCT_ITIMERVAL
 +      COMPAT_CFLAGS += -DNO_STRUCT_ITIMERVAL
 +      NO_SETITIMER=YesPlease
 +endif
 +ifdef NO_SETITIMER
 +      COMPAT_CFLAGS += -DNO_SETITIMER
 +endif
  ifdef NO_PREAD
        COMPAT_CFLAGS += -DNO_PREAD
        COMPAT_OBJS += compat/pread.o