{"thread":{"id":"23619","subject":"[patch 01/16] user-cppflags.patch","startedAt":"2010-04-27T13:57:08Z","lastAt":"2010-05-04T05:01:55Z","messageCount":49,"participants":["Gary V. Vaughan","Erik Faye-Lund","Tor Arntsen","Michael J Gruber","Jonathan Nieder","Jeff King","Andreas Schwab","Ævar Arnfjörð Bjarmason","Junio C Hamano","Øyvind A. Holm"],"isPatch":true,"patchVersion":1,"patchTotal":16},"messages":[{"id":"140499","messageId":"20100427135708.258636000@mlists.thewrittenword.com","threadId":"23619","inReplyTo":null,"subject":"[patch 00/16] Portability Patches for git-1.7.1 (v4)","fromName":"Gary V. Vaughan","fromEmail":"git@mlists.thewrittenword.com","sentAt":"2010-04-27T13:57:08Z","receivedAt":"2010-04-27T13:57:08Z","isPatch":true,"sender":{"key":"git@mlists.thewrittenword.com","avatar":null},"body":"Here are the portability patches we needed at TWW to enable git-1.7.1\nto compile and run on all of the wide range of Unix machines we\nsupport.  These patches apply to the git-1.7.1 release,  and address\nall of the feedback from the previous three times I posted them to\nthis list, including fixing the massive testsuite failures I was\nexperiencing and taking into account that the ss_family fixes and\npartial GMT_CMP_TEST fixes that have been pushed since my last post of\nthis patch queue.\n\nWith the exception of a hand-full of test failures outside of Linux \nand Solaris8+, git now compiles and passes all tests on the following\narchitectures:\n\n        Solaris 2.6/SPARC\n        Solaris 7/SPARC\n        Solaris 8/SPARC  \n        Solaris 9/SPARC\n        Solaris 10/SPARC         \n        Solaris 10/Intel         \n        HP-UX 10.20/PA\n        HP-UX 11.00/PA \n        HP-UX 11.11/PA   \n        HP-UX 11.23/PA   \n        HP-UX 11.23/IA\n        HP-UX 11.31/PA\n        HP-UX 11.31/IA   \n        AIX 5.1  \n        AIX 5.2\n        AIX 5.3  \n        AIX 6.1  \n        Tru64 UNIX 5.1   \n        IRIX 6.5         \n        RHEL 3/x86       \n        RHEL 3/amd64     \n        RHEL 4/x86 \n        RHEL 4/amd64     \n        RHEL 5/x86       \n        RHEL 5/amd64     \n        SLES 10/x86      \n        SLES 10/amd64    \n\nCheers,\n-- \nGary V. Vaughan (gary@thewrittenword.com)\n"},{"id":"140498","messageId":"20100427135807.015320000@mlists.thewrittenword.com","threadId":"23619","inReplyTo":"20100427135708.258636000@mlists.thewrittenword.com","subject":"[patch 01/16] user-cppflags.patch","fromName":"Gary V. Vaughan","fromEmail":"git@mlists.thewrittenword.com","sentAt":"2010-04-27T13:57:09Z","receivedAt":"2010-04-27T13:57:09Z","isPatch":true,"sender":{"key":"git@mlists.thewrittenword.com","avatar":null},"body":"Without this patch there is no straight forward way to pass additional\nCPPFLAGS at configure-time.  At TWW, everything non-vendor package is\ninstalled to its own subdirectory, so we need the following to show\nthe preprocessor where the headers for the libraries we will link\nlater can be found:\n\n\t$SHELL ./configure \\\n\tCPPFLAGS=\"-I${SB_VAR_CURL_INC}\\\n\t -I${SB_VAR_LIBEXPAT_INC}\\\n\t -I${SB_VAR_LIBZ_INC}\\\n\t${CPPFLAGS+ $CPPFLAGS}\" <<...>>\n---\n Makefile      |    2 +-\n config.mak.in |    1 +\n 2 files changed, 2 insertions(+), 1 deletion(-)\n\nIndex: b/Makefile\n===================================================================\n--- a/Makefile\n+++ b/Makefile\n@@ -246,7 +246,7 @@ endif\n \n CFLAGS = -g -O2 -Wall\n LDFLAGS =\n-ALL_CFLAGS = $(CFLAGS)\n+ALL_CFLAGS = $(CPPFLAGS) $(CFLAGS)\n ALL_LDFLAGS = $(LDFLAGS)\n STRIP ?= strip\n \nIndex: b/config.mak.in\n===================================================================\n--- a/config.mak.in\n+++ b/config.mak.in\n@@ -3,6 +3,7 @@\n \n CC = @CC@\n CFLAGS = @CFLAGS@\n+CPPFLAGS = @CPPFLAGS@\n LDFLAGS = @LDFLAGS@\n CC_LD_DYNPATH = @CC_LD_DYNPATH@\n AR = @AR@\n\n-- \nGary V. Vaughan (gary@thewrittenword.com)\n"},{"id":"140500","messageId":"20100427135812.656626000@mlists.thewrittenword.com","threadId":"23619","inReplyTo":"20100427135708.258636000@mlists.thewrittenword.com","subject":"[patch 02/16] const-expr.patch","fromName":"Gary V. Vaughan","fromEmail":"git@mlists.thewrittenword.com","sentAt":"2010-04-27T13:57:10Z","receivedAt":"2010-04-27T13:57:10Z","isPatch":true,"sender":{"key":"git@mlists.thewrittenword.com","avatar":null},"body":"Unfortunately, there are still plenty of production systems with\nvendor compilers that choke unless all compound declarations can be\ndetermined statically at compile time, for example hpux10.20 (I can\nprovide a comprehensive list of our supported platforms that exhibit\nthis problem if necessary).\n\nThis patch simply breaks apart any compound declarations with dynamic\ninitialisation expressions, and moves the initialisation until after\nthe last declaration in the same block, in all the places necessary to\nhave the offending compilers accept the code.\n---\n builtin/add.c      |    4 +++-\n builtin/blame.c    |   10 ++++++----\n builtin/cat-file.c |    4 +++-\n builtin/checkout.c |    3 ++-\n builtin/commit.c   |    3 ++-\n builtin/fetch.c    |    6 ++++--\n builtin/remote.c   |    9 ++++++---\n convert.c          |    4 +++-\n daemon.c           |   19 ++++++++++---------\n ll-merge.c         |   14 +++++++-------\n refs.c             |    6 +++++-\n remote.c           |    3 +--\n unpack-trees.c     |    4 +++-\n wt-status.c        |   23 ++++++++++++-----------\n 14 files changed, 67 insertions(+), 45 deletions(-)\n\nIndex: b/convert.c\n===================================================================\n--- a/convert.c\n+++ b/convert.c\n@@ -249,7 +249,9 @@ static int filter_buffer(int in, int out\n \tstruct child_process child_process;\n \tstruct filter_params *params = (struct filter_params *)data;\n \tint write_err, status;\n-\tconst char *argv[] = { params->cmd, NULL };\n+\tconst char *argv[] = { NULL, NULL };\n+\n+\targv[0] = params->cmd;\n \n \tmemset(&child_process, 0, sizeof(child_process));\n \tchild_process.argv = argv;\nIndex: b/remote.c\n===================================================================\n--- a/remote.c\n+++ b/remote.c\n@@ -657,10 +657,9 @@ static struct refspec *parse_refspec_int\n \n int valid_fetch_refspec(const char *fetch_refspec_str)\n {\n-\tconst char *fetch_refspec[] = { fetch_refspec_str };\n \tstruct refspec *refspec;\n \n-\trefspec = parse_refspec_internal(1, fetch_refspec, 1, 1);\n+\trefspec = parse_refspec_internal(1, &fetch_refspec_str, 1, 1);\n \tfree_refspecs(refspec, 1);\n \treturn !!refspec;\n }\nIndex: b/unpack-trees.c\n===================================================================\n--- a/unpack-trees.c\n+++ b/unpack-trees.c\n@@ -287,9 +287,11 @@ static void add_same_unmerged(struct cac\n static int unpack_index_entry(struct cache_entry *ce,\n \t\t\t      struct unpack_trees_options *o)\n {\n-\tstruct cache_entry *src[5] = { ce, NULL, };\n+\tstruct cache_entry *src[5] = { NULL, NULL };\n \tint ret;\n \n+\tsrc[0] = ce;\n+\n \tmark_ce_used(ce, o);\n \tif (ce_stage(ce)) {\n \t\tif (o->skip_unmerged) {\nIndex: b/daemon.c\n===================================================================\n--- a/daemon.c\n+++ b/daemon.c\n@@ -141,15 +141,14 @@ static char *path_ok(char *directory)\n \t}\n \telse if (interpolated_path && saw_extended_args) {\n \t\tstruct strbuf expanded_path = STRBUF_INIT;\n-\t\tstruct strbuf_expand_dict_entry dict[] = {\n-\t\t\t{ \"H\", hostname },\n-\t\t\t{ \"CH\", canon_hostname },\n-\t\t\t{ \"IP\", ip_address },\n-\t\t\t{ \"P\", tcp_port },\n-\t\t\t{ \"D\", directory },\n-\t\t\t{ NULL }\n-\t\t};\n+\t\tstruct strbuf_expand_dict_entry dict[6];\n \n+\t\tdict[0].placeholder = \"H\"; dict[0].value = hostname;\n+\t\tdict[1].placeholder = \"CH\"; dict[1].value = canon_hostname;\n+\t\tdict[2].placeholder = \"IP\"; dict[2].value = ip_address;\n+\t\tdict[3].placeholder = \"P\"; dict[3].value = tcp_port;\n+\t\tdict[4].placeholder = \"D\"; dict[4].value = directory;\n+\t\tdict[5].placeholder = NULL; dict[5].value = NULL;\n \t\tif (*dir != '/') {\n \t\t\t/* Allow only absolute */\n \t\t\tlogerror(\"'%s': Non-absolute path denied (interpolated-path active)\", dir);\n@@ -343,7 +342,9 @@ static int upload_pack(void)\n {\n \t/* Timeout as string */\n \tchar timeout_buf[64];\n-\tconst char *argv[] = { \"upload-pack\", \"--strict\", timeout_buf, \".\", NULL };\n+\tconst char *argv[] = { \"upload-pack\", \"--strict\", NULL, \".\", NULL };\n+\n+\targv[2] = timeout_buf;\n \n \tsnprintf(timeout_buf, sizeof timeout_buf, \"--timeout=%u\", timeout);\n \treturn run_service_command(argv);\nIndex: b/wt-status.c\n===================================================================\n--- a/wt-status.c\n+++ b/wt-status.c\n@@ -498,17 +498,18 @@ static void wt_status_print_submodule_su\n \tstruct child_process sm_summary;\n \tchar summary_limit[64];\n \tchar index[PATH_MAX];\n-\tconst char *env[] = { index, NULL };\n-\tconst char *argv[] = {\n-\t\t\"submodule\",\n-\t\t\"summary\",\n-\t\tuncommitted ? \"--files\" : \"--cached\",\n-\t\t\"--for-status\",\n-\t\t\"--summary-limit\",\n-\t\tsummary_limit,\n-\t\tuncommitted ? NULL : (s->amend ? \"HEAD^\" : \"HEAD\"),\n-\t\tNULL\n-\t};\n+\tconst char *env[] = { NULL, NULL };\n+\tconst char *argv[8];\n+\n+\tenv[0] =\tindex;\n+\targv[0] =\t\"submodule\";\n+\targv[1] =\t\"summary\";\n+\targv[2] =\tuncommitted ? \"--files\" : \"--cached\";\n+\targv[3] =\t\"--for-status\";\n+\targv[4] =\t\"--summary-limit\";\n+\targv[5] =\tsummary_limit;\n+\targv[6] =\tuncommitted ? NULL : (s->amend ? \"HEAD^\" : \"HEAD\");\n+\targv[7] =\tNULL;\n \n \tsprintf(summary_limit, \"%d\", s->submodule_summary);\n \tsnprintf(index, sizeof(index), \"GIT_INDEX_FILE=%s\", s->index_file);\nIndex: b/ll-merge.c\n===================================================================\n--- a/ll-merge.c\n+++ b/ll-merge.c\n@@ -139,17 +139,17 @@ static int ll_ext_merge(const struct ll_\n {\n \tchar temp[4][50];\n \tstruct strbuf cmd = STRBUF_INIT;\n-\tstruct strbuf_expand_dict_entry dict[] = {\n-\t\t{ \"O\", temp[0] },\n-\t\t{ \"A\", temp[1] },\n-\t\t{ \"B\", temp[2] },\n-\t\t{ \"L\", temp[3] },\n-\t\t{ NULL }\n-\t};\n+\tstruct strbuf_expand_dict_entry dict[5];\n \tconst char *args[] = { NULL, NULL };\n \tint status, fd, i;\n \tstruct stat st;\n \n+\tdict[0].placeholder = \"O\"; dict[0].value = temp[0];\n+\tdict[1].placeholder = \"A\"; dict[1].value = temp[1];\n+\tdict[2].placeholder = \"B\"; dict[2].value = temp[2];\n+\tdict[3].placeholder = \"L\"; dict[3].value = temp[3];\n+\tdict[4].placeholder = NULL; dict[4].value = NULL;\n+\n \tif (fn->cmdline == NULL)\n \t\tdie(\"custom merge driver %s lacks command line.\", fn->name);\n \nIndex: b/builtin/commit.c\n===================================================================\n--- a/builtin/commit.c\n+++ b/builtin/commit.c\n@@ -717,7 +717,8 @@ static int prepare_to_commit(const char \n \n \tif (use_editor) {\n \t\tchar index[PATH_MAX];\n-\t\tconst char *env[2] = { index, NULL };\n+\t\tconst char *env[] = { NULL, NULL };\n+\t\tenv[0] =  index;\n \t\tsnprintf(index, sizeof(index), \"GIT_INDEX_FILE=%s\", index_file);\n \t\tif (launch_editor(git_path(commit_editmsg), NULL, env)) {\n \t\t\tfprintf(stderr,\nIndex: b/builtin/remote.c\n===================================================================\n--- a/builtin/remote.c\n+++ b/builtin/remote.c\n@@ -705,11 +705,14 @@ static int rm(int argc, const char **arg\n \tstruct known_remotes known_remotes = { NULL, NULL };\n \tstruct string_list branches = { NULL, 0, 0, 1 };\n \tstruct string_list skipped = { NULL, 0, 0, 1 };\n-\tstruct branches_for_remote cb_data = {\n-\t\tNULL, &branches, &skipped, &known_remotes\n-\t};\n+\tstruct branches_for_remote cb_data;\n \tint i, result;\n \n+\tmemset(&cb_data,0,sizeof(cb_data));\n+\tcb_data.branches = &branches;\n+\tcb_data.skipped = &skipped;\n+\tcb_data.keep = &known_remotes;\n+\n \tif (argc != 2)\n \t\tusage_with_options(builtin_remote_rm_usage, options);\n \nIndex: b/builtin/blame.c\n===================================================================\n--- a/builtin/blame.c\n+++ b/builtin/blame.c\n@@ -733,10 +733,11 @@ static int pass_blame_to_parent(struct s\n {\n \tint last_in_target;\n \tmmfile_t file_p, file_o;\n-\tstruct blame_chunk_cb_data d = { sb, target, parent, 0, 0 };\n+\tstruct blame_chunk_cb_data d;\n \txpparam_t xpp;\n \txdemitconf_t xecfg;\n-\n+\tmemset(&d,0,sizeof(d));\n+\td.sb = sb; d.target = target; d.parent=parent;\n \tlast_in_target = find_last_in_target(sb, target);\n \tif (last_in_target < 0)\n \t\treturn 1; /* nothing remains for this target */\n@@ -875,10 +876,11 @@ static void find_copy_in_blob(struct sco\n \tconst char *cp;\n \tint cnt;\n \tmmfile_t file_o;\n-\tstruct handle_split_cb_data d = { sb, ent, parent, split, 0, 0 };\n+\tstruct handle_split_cb_data d;\n \txpparam_t xpp;\n \txdemitconf_t xecfg;\n-\n+\tmemset(&d,0,sizeof(d));\n+\td.sb = sb; d.ent = ent; d.parent = parent; d.split = split;\n \t/*\n \t * Prepare mmfile that contains only the lines in ent.\n \t */\nIndex: b/builtin/cat-file.c\n===================================================================\n--- a/builtin/cat-file.c\n+++ b/builtin/cat-file.c\n@@ -118,7 +118,9 @@ static int cat_one_file(int opt, const c\n \n \t\t/* custom pretty-print here */\n \t\tif (type == OBJ_TREE) {\n-\t\t\tconst char *ls_args[3] = {\"ls-tree\", obj_name, NULL};\n+\t\t\tconst char *ls_args[3] = { NULL, NULL, NULL };\n+\t\t\tls_args[0] =  \"ls-tree\";\n+\t\t\tls_args[1] =  obj_name;\n \t\t\treturn cmd_ls_tree(2, ls_args, NULL);\n \t\t}\n \nIndex: b/refs.c\n===================================================================\n--- a/refs.c\n+++ b/refs.c\n@@ -314,7 +314,11 @@ static int warn_if_dangling_symref(const\n \n void warn_dangling_symref(FILE *fp, const char *msg_fmt, const char *refname)\n {\n-\tstruct warn_if_dangling_data data = { fp, refname, msg_fmt };\n+\tstruct warn_if_dangling_data data;\n+\n+\tdata.fp = fp;\n+\tdata.refname = refname;\n+\tdata.msg_fmt = msg_fmt;\n \tfor_each_rawref(warn_if_dangling_symref, &data);\n }\n \nIndex: b/builtin/add.c\n===================================================================\n--- a/builtin/add.c\n+++ b/builtin/add.c\n@@ -261,12 +261,14 @@ static int edit_patch(int argc, const ch\n {\n \tchar *file = xstrdup(git_path(\"ADD_EDIT.patch\"));\n \tconst char *apply_argv[] = { \"apply\", \"--recount\", \"--cached\",\n-\t\tfile, NULL };\n+\t\tNULL, NULL };\n \tstruct child_process child;\n \tstruct rev_info rev;\n \tint out;\n \tstruct stat st;\n \n+\tapply_argv[3] = file;\n+\n \tgit_config(git_diff_basic_config, NULL); /* no \"diff\" UI options */\n \n \tif (read_cache() < 0)\nIndex: b/builtin/checkout.c\n===================================================================\n--- a/builtin/checkout.c\n+++ b/builtin/checkout.c\n@@ -609,7 +609,8 @@ static int check_tracking_name(const cha\n \n static const char *unique_tracking_name(const char *name)\n {\n-\tstruct tracking_name_data cb_data = { name, NULL, 1 };\n+\tstruct tracking_name_data cb_data = { NULL, NULL, 1 };\n+\tcb_data.name = name;\n \tfor_each_ref(check_tracking_name, &cb_data);\n \tif (cb_data.unique)\n \t\treturn cb_data.remote;\nIndex: b/builtin/fetch.c\n===================================================================\n--- a/builtin/fetch.c\n+++ b/builtin/fetch.c\n@@ -574,9 +574,10 @@ static void find_non_local_tags(struct t\n {\n \tstruct string_list existing_refs = { NULL, 0, 0, 0 };\n \tstruct string_list remote_refs = { NULL, 0, 0, 0 };\n-\tstruct tag_data data = {head, tail};\n+\tstruct tag_data data;\n \tconst struct ref *ref;\n \tstruct string_list_item *item = NULL;\n+\tdata.head = head; data.tail = tail;\n \n \tfor_each_ref(add_existing, &existing_refs);\n \tfor (ref = transport_get_remote_refs(transport); ref; ref = ref->next) {\n@@ -778,7 +779,8 @@ static int get_remote_group(const char *\n static int add_remote_or_group(const char *name, struct string_list *list)\n {\n \tint prev_nr = list->nr;\n-\tstruct remote_group_data g = { name, list };\n+\tstruct remote_group_data g;\n+\tg.name = name; g.list = list;\n \n \tgit_config(get_remote_group, &g);\n \tif (list->nr == prev_nr) {\n\n-- \nGary V. Vaughan (gary@thewrittenword.com)\n"},{"id":"140501","messageId":"20100427135817.815658000@mlists.thewrittenword.com","threadId":"23619","inReplyTo":"20100427135708.258636000@mlists.thewrittenword.com","subject":"[patch 03/16] pthread.patch","fromName":"Gary V. Vaughan","fromEmail":"git@mlists.thewrittenword.com","sentAt":"2010-04-27T13:57:11Z","receivedAt":"2010-04-27T13:57:11Z","isPatch":true,"sender":{"key":"git@mlists.thewrittenword.com","avatar":null},"body":"Without this patch, systems that provide stubs for pthread functions\nin libc, but which still require libpthread for full the pthread\nimplementation are not detected correctly.\n\nAlso, some systems require -pthread in CFLAGS for each compilation\nunit for a successful link of an mt binary, which is also addressed by\nthis patch.\n---\n Makefile      |    4 ++++\n config.mak.in |    1 +\n configure.ac  |   17 +++++++++++++++--\n 3 files changed, 20 insertions(+), 2 deletions(-)\n\nIndex: b/Makefile\n===================================================================\n--- a/Makefile\n+++ b/Makefile\n@@ -294,6 +294,7 @@ RPMBUILD = rpmbuild\n TCL_PATH = tclsh\n TCLTK_PATH = wish\n PTHREAD_LIBS = -lpthread\n+PTHREAD_CFLAGS =\n \n export TCL_PATH TCLTK_PATH\n \n@@ -898,6 +899,8 @@ ifeq ($(uname_S),AIX)\n \tBASIC_CFLAGS += -D_LARGE_FILES\n \tifeq ($(shell expr \"$(uname_V)\" : '[1234]'),1)\n \t\tNO_PTHREADS = YesPlease\n+\telse\n+\t\tPTHREAD_LIBS = -lpthread\n \tendif\n endif\n ifeq ($(uname_S),GNU)\n@@ -1349,6 +1352,7 @@ endif\n ifdef NO_PTHREADS\n \tBASIC_CFLAGS += -DNO_PTHREADS\n else\n+\tBASIC_CFLAGS += $(PTHREAD_CFLAGS)\n \tEXTLIBS += $(PTHREAD_LIBS)\n \tLIB_OBJS += thread-utils.o\n endif\nIndex: b/configure.ac\n===================================================================\n--- a/configure.ac\n+++ b/configure.ac\n@@ -802,7 +802,11 @@ AC_DEFUN([PTHREADTEST_SRC], [\n int main(void)\n {\n \tpthread_mutex_t test_mutex;\n-\treturn (0);\n+\tint retcode = 0;\n+\tretcode |= pthread_mutex_init(&test_mutex,(void*)0);\n+\tretcode |= pthread_mutex_lock(&test_mutex);\n+\tretcode |= pthread_mutex_unlock(&test_mutex);\n+\treturn retcode;\n }\n ])\n \n@@ -819,7 +823,8 @@ if test -n \"$USER_NOPTHREAD\"; then\n # handle these separately since PTHREAD_CFLAGS could be '-lpthreads\n # -D_REENTRANT' or some such.\n elif test -z \"$PTHREAD_CFLAGS\"; then\n-  for opt in -pthread -lpthread; do\n+  threads_found=no\n+  for opt in -mt -pthread -lpthread; do\n      old_CFLAGS=\"$CFLAGS\"\n      CFLAGS=\"$opt $CFLAGS\"\n      AC_MSG_CHECKING([Checking for POSIX Threads with '$opt'])\n@@ -827,11 +832,18 @@ elif test -z \"$PTHREAD_CFLAGS\"; then\n \t[AC_MSG_RESULT([yes])\n \t\tNO_PTHREADS=\n \t\tPTHREAD_LIBS=\"$opt\"\n+\t\tPTHREAD_CFLAGS=\"$opt\"\n+\t\tthreads_found=yes\n \t\tbreak\n \t],\n \t[AC_MSG_RESULT([no])])\n       CFLAGS=\"$old_CFLAGS\"\n   done\n+  if test $threads_found != yes; then\n+    AC_CHECK_LIB([pthread], [pthread_create],\n+\t[PTHREAD_LIBS=\"-lpthread\"],\n+\t[NO_PTHREADS=UnfortunatelyYes])\n+  fi\n else\n   old_CFLAGS=\"$CFLAGS\"\n   CFLAGS=\"$PTHREAD_CFLAGS $CFLAGS\"\n@@ -848,6 +860,7 @@ fi\n \n CFLAGS=\"$old_CFLAGS\"\n \n+AC_SUBST(PTHREAD_CFLAGS)\n AC_SUBST(PTHREAD_LIBS)\n AC_SUBST(NO_PTHREADS)\n \nIndex: b/config.mak.in\n===================================================================\n--- a/config.mak.in\n+++ b/config.mak.in\n@@ -57,4 +57,5 @@ NO_DEFLATE_BOUND=@NO_DEFLATE_BOUND@\n FREAD_READS_DIRECTORIES=@FREAD_READS_DIRECTORIES@\n SNPRINTF_RETURNS_BOGUS=@SNPRINTF_RETURNS_BOGUS@\n NO_PTHREADS=@NO_PTHREADS@\n+PTHREAD_CFLAGS=@PTHREAD_CFLAGS@\n PTHREAD_LIBS=@PTHREAD_LIBS@\n\n-- \nGary V. Vaughan (gary@thewrittenword.com)\n"},{"id":"140502","messageId":"20100427135823.017417000@mlists.thewrittenword.com","threadId":"23619","inReplyTo":"20100427135708.258636000@mlists.thewrittenword.com","subject":"[patch 04/16] Without this patch at least IBM VisualAge C 5.0 (I have 5.0.2) on AIX 5.1 fails to compile git.","fromName":"Gary V. Vaughan","fromEmail":"git@mlists.thewrittenword.com","sentAt":"2010-04-27T13:57:12Z","receivedAt":"2010-04-27T13:57:12Z","isPatch":true,"sender":{"key":"git@mlists.thewrittenword.com","avatar":null},"body":"enum style is inconsistent already, with some enums declared on one\nline, some over 3 lines with the enum values all on the middle line,\nsometimes with 1 enum value per line... and independently of that the\ntrailing comma is sometimes present and other times absent, often\nmixing with/without trailing comma styles in a single file, and\nsometimes in consecutive enum declarations.\n\nClearly, omitting the comma is the more portable style, and this patch\nchanges all enum declarations to use the portable omitted dangling\ncomma style consistently.\n---\n attr.h                 |    2 +-\n builtin/apply.c        |    4 ++--\n builtin/branch.c       |    4 ++--\n builtin/commit.c       |    6 +++---\n builtin/help.c         |    2 +-\n builtin/mailinfo.c     |    4 ++--\n builtin/receive-pack.c |    2 +-\n builtin/remote.c       |    2 +-\n cache.h                |   16 ++++++++--------\n commit.h               |    2 +-\n connect.c              |    2 +-\n ctype.c                |    2 +-\n diff.h                 |    2 +-\n dir.c                  |    6 +++---\n fast-import.c          |    2 +-\n grep.h                 |    8 ++++----\n http-push.c            |    2 +-\n http-walker.c          |    2 +-\n imap-send.c            |    2 +-\n merge-recursive.h      |    2 +-\n parse-options.h        |    6 +++---\n pretty.c               |    2 +-\n remote.h               |    2 +-\n rerere.c               |    2 +-\n revision.c             |    2 +-\n wt-status.h            |    2 +-\n 26 files changed, 45 insertions(+), 45 deletions(-)\n\nIndex: b/attr.h\n===================================================================\n--- a/attr.h\n+++ b/attr.h\n@@ -34,7 +34,7 @@ int git_checkattr(const char *path, int,\n enum git_attr_direction {\n \tGIT_ATTR_CHECKIN,\n \tGIT_ATTR_CHECKOUT,\n-\tGIT_ATTR_INDEX,\n+\tGIT_ATTR_INDEX\n };\n void git_attr_set_direction(enum git_attr_direction, struct index_state *);\n \nIndex: b/builtin/apply.c\n===================================================================\n--- a/builtin/apply.c\n+++ b/builtin/apply.c\n@@ -56,7 +56,7 @@ static enum ws_error_action {\n \tnowarn_ws_error,\n \twarn_on_ws_error,\n \tdie_on_ws_error,\n-\tcorrect_ws_error,\n+\tcorrect_ws_error\n } ws_error_action = warn_on_ws_error;\n static int whitespace_error;\n static int squelch_whitespace_errors = 5;\n@@ -64,7 +64,7 @@ static int applied_after_fixing_ws;\n \n static enum ws_ignore {\n \tignore_ws_none,\n-\tignore_ws_change,\n+\tignore_ws_change\n } ws_ignore_action = ignore_ws_none;\n \n \nIndex: b/builtin/branch.c\n===================================================================\n--- a/builtin/branch.c\n+++ b/builtin/branch.c\n@@ -43,13 +43,13 @@ enum color_branch {\n \tBRANCH_COLOR_PLAIN = 1,\n \tBRANCH_COLOR_REMOTE = 2,\n \tBRANCH_COLOR_LOCAL = 3,\n-\tBRANCH_COLOR_CURRENT = 4,\n+\tBRANCH_COLOR_CURRENT = 4\n };\n \n static enum merge_filter {\n \tNO_FILTER = 0,\n \tSHOW_NOT_MERGED,\n-\tSHOW_MERGED,\n+\tSHOW_MERGED\n } merge_filter;\n static unsigned char merge_filter_ref[20];\n \nIndex: b/builtin/commit.c\n===================================================================\n--- a/builtin/commit.c\n+++ b/builtin/commit.c\n@@ -57,7 +57,7 @@ static struct lock_file false_lock; /* u\n static enum {\n \tCOMMIT_AS_IS = 1,\n \tCOMMIT_NORMAL,\n-\tCOMMIT_PARTIAL,\n+\tCOMMIT_PARTIAL\n } commit_style;\n \n static const char *logfile, *force_author;\n@@ -78,7 +78,7 @@ static char *untracked_files_arg, *force\n static enum {\n \tCLEANUP_SPACE,\n \tCLEANUP_NONE,\n-\tCLEANUP_ALL,\n+\tCLEANUP_ALL\n } cleanup_mode;\n static char *cleanup_arg;\n \n@@ -90,7 +90,7 @@ static int null_termination;\n static enum {\n \tSTATUS_FORMAT_LONG,\n \tSTATUS_FORMAT_SHORT,\n-\tSTATUS_FORMAT_PORCELAIN,\n+\tSTATUS_FORMAT_PORCELAIN\n } status_format = STATUS_FORMAT_LONG;\n \n static int opt_parse_m(const struct option *opt, const char *arg, int unset)\nIndex: b/builtin/help.c\n===================================================================\n--- a/builtin/help.c\n+++ b/builtin/help.c\n@@ -26,7 +26,7 @@ enum help_format {\n \tHELP_FORMAT_NONE,\n \tHELP_FORMAT_MAN,\n \tHELP_FORMAT_INFO,\n-\tHELP_FORMAT_WEB,\n+\tHELP_FORMAT_WEB\n };\n \n static int show_all = 0;\nIndex: b/builtin/mailinfo.c\n===================================================================\n--- a/builtin/mailinfo.c\n+++ b/builtin/mailinfo.c\n@@ -17,10 +17,10 @@ static struct strbuf name = STRBUF_INIT;\n static struct strbuf email = STRBUF_INIT;\n \n static enum  {\n-\tTE_DONTCARE, TE_QP, TE_BASE64,\n+\tTE_DONTCARE, TE_QP, TE_BASE64\n } transfer_encoding;\n static enum  {\n-\tTYPE_TEXT, TYPE_OTHER,\n+\tTYPE_TEXT, TYPE_OTHER\n } message_type;\n \n static struct strbuf charset = STRBUF_INIT;\nIndex: b/builtin/receive-pack.c\n===================================================================\n--- a/builtin/receive-pack.c\n+++ b/builtin/receive-pack.c\n@@ -16,7 +16,7 @@ enum deny_action {\n \tDENY_UNCONFIGURED,\n \tDENY_IGNORE,\n \tDENY_WARN,\n-\tDENY_REFUSE,\n+\tDENY_REFUSE\n };\n \n static int deny_deletes;\nIndex: b/builtin/remote.c\n===================================================================\n--- a/builtin/remote.c\n+++ b/builtin/remote.c\n@@ -317,7 +317,7 @@ struct push_info {\n \t\tPUSH_STATUS_UPTODATE,\n \t\tPUSH_STATUS_FASTFORWARD,\n \t\tPUSH_STATUS_OUTOFDATE,\n-\t\tPUSH_STATUS_NOTQUERIED,\n+\t\tPUSH_STATUS_NOTQUERIED\n \t} status;\n };\n \nIndex: b/cache.h\n===================================================================\n--- a/cache.h\n+++ b/cache.h\n@@ -361,7 +361,7 @@ enum object_type {\n \tOBJ_OFS_DELTA = 6,\n \tOBJ_REF_DELTA = 7,\n \tOBJ_ANY,\n-\tOBJ_MAX,\n+\tOBJ_MAX\n };\n \n static inline enum object_type object_type(unsigned int mode)\n@@ -556,7 +556,7 @@ extern int core_apply_sparse_checkout;\n enum safe_crlf {\n \tSAFE_CRLF_FALSE = 0,\n \tSAFE_CRLF_FAIL = 1,\n-\tSAFE_CRLF_WARN = 2,\n+\tSAFE_CRLF_WARN = 2\n };\n \n extern enum safe_crlf safe_crlf;\n@@ -567,21 +567,21 @@ enum branch_track {\n \tBRANCH_TRACK_REMOTE,\n \tBRANCH_TRACK_ALWAYS,\n \tBRANCH_TRACK_EXPLICIT,\n-\tBRANCH_TRACK_OVERRIDE,\n+\tBRANCH_TRACK_OVERRIDE\n };\n \n enum rebase_setup_type {\n \tAUTOREBASE_NEVER = 0,\n \tAUTOREBASE_LOCAL,\n \tAUTOREBASE_REMOTE,\n-\tAUTOREBASE_ALWAYS,\n+\tAUTOREBASE_ALWAYS\n };\n \n enum push_default_type {\n \tPUSH_DEFAULT_NOTHING = 0,\n \tPUSH_DEFAULT_MATCHING,\n \tPUSH_DEFAULT_TRACKING,\n-\tPUSH_DEFAULT_CURRENT,\n+\tPUSH_DEFAULT_CURRENT\n };\n \n extern enum branch_track git_branch_track;\n@@ -590,7 +590,7 @@ extern enum push_default_type push_defau\n \n enum object_creation_mode {\n \tOBJECT_CREATION_USES_HARDLINKS = 0,\n-\tOBJECT_CREATION_USES_RENAMES = 1,\n+\tOBJECT_CREATION_USES_RENAMES = 1\n };\n \n extern enum object_creation_mode object_creation_mode;\n@@ -670,7 +670,7 @@ enum sharedrepo {\n \tOLD_PERM_GROUP      = 1,\n \tOLD_PERM_EVERYBODY  = 2,\n \tPERM_GROUP          = 0660,\n-\tPERM_EVERYBODY      = 0664,\n+\tPERM_EVERYBODY      = 0664\n };\n int git_config_perm(const char *var, const char *value);\n int set_shared_perm(const char *path, int mode);\n@@ -880,7 +880,7 @@ struct ref {\n \t\tREF_STATUS_REJECT_NODELETE,\n \t\tREF_STATUS_UPTODATE,\n \t\tREF_STATUS_REMOTE_REJECT,\n-\t\tREF_STATUS_EXPECTING_REPORT,\n+\t\tREF_STATUS_EXPECTING_REPORT\n \t} status;\n \tchar *remote_status;\n \tstruct ref *peer_ref; /* when renaming */\nIndex: b/commit.h\n===================================================================\n--- a/commit.h\n+++ b/commit.h\n@@ -60,7 +60,7 @@ enum cmit_fmt {\n \tCMIT_FMT_EMAIL,\n \tCMIT_FMT_USERFORMAT,\n \n-\tCMIT_FMT_UNSPECIFIED,\n+\tCMIT_FMT_UNSPECIFIED\n };\n \n struct pretty_print_context\nIndex: b/connect.c\n===================================================================\n--- a/connect.c\n+++ b/connect.c\n@@ -131,7 +131,7 @@ int path_match(const char *path, int nr,\n enum protocol {\n \tPROTO_LOCAL = 1,\n \tPROTO_SSH,\n-\tPROTO_GIT,\n+\tPROTO_GIT\n };\n \n static enum protocol get_protocol(const char *name)\nIndex: b/ctype.c\n===================================================================\n--- a/ctype.c\n+++ b/ctype.c\n@@ -10,7 +10,7 @@ enum {\n \tA = GIT_ALPHA,\n \tD = GIT_DIGIT,\n \tG = GIT_GLOB_SPECIAL,\t/* *, ?, [, \\\\ */\n-\tR = GIT_REGEX_SPECIAL,\t/* $, (, ), +, ., ^, {, | */\n+\tR = GIT_REGEX_SPECIAL\t/* $, (, ), +, ., ^, {, | */\n };\n \n unsigned char sane_ctype[256] = {\nIndex: b/diff.h\n===================================================================\n--- a/diff.h\n+++ b/diff.h\n@@ -133,7 +133,7 @@ enum color_diff {\n \tDIFF_FILE_NEW = 5,\n \tDIFF_COMMIT = 6,\n \tDIFF_WHITESPACE = 7,\n-\tDIFF_FUNCINFO = 8,\n+\tDIFF_FUNCINFO = 8\n };\n const char *diff_get_color(int diff_use_color, enum color_diff ix);\n #define diff_get_color_opt(o, ix) \\\nIndex: b/dir.c\n===================================================================\n--- a/dir.c\n+++ b/dir.c\n@@ -465,7 +465,7 @@ static struct dir_entry *dir_add_ignored\n enum exist_status {\n \tindex_nonexistent = 0,\n \tindex_directory,\n-\tindex_gitdir,\n+\tindex_gitdir\n };\n \n /*\n@@ -533,7 +533,7 @@ static enum exist_status directory_exist\n enum directory_treatment {\n \tshow_directory,\n \tignore_directory,\n-\trecurse_into_directory,\n+\trecurse_into_directory\n };\n \n static enum directory_treatment treat_directory(struct dir_struct *dir,\n@@ -684,7 +684,7 @@ static int get_dtype(struct dirent *de, \n enum path_treatment {\n \tpath_ignored,\n \tpath_handled,\n-\tpath_recurse,\n+\tpath_recurse\n };\n \n static enum path_treatment treat_one_path(struct dir_struct *dir,\nIndex: b/fast-import.c\n===================================================================\n--- a/fast-import.c\n+++ b/fast-import.c\n@@ -267,7 +267,7 @@ struct hash_list\n typedef enum {\n \tWHENSPEC_RAW = 1,\n \tWHENSPEC_RFC2822,\n-\tWHENSPEC_NOW,\n+\tWHENSPEC_NOW\n } whenspec_type;\n \n struct recent_command\nIndex: b/grep.h\n===================================================================\n--- a/grep.h\n+++ b/grep.h\n@@ -10,17 +10,17 @@ enum grep_pat_token {\n \tGREP_OPEN_PAREN,\n \tGREP_CLOSE_PAREN,\n \tGREP_NOT,\n-\tGREP_OR,\n+\tGREP_OR\n };\n \n enum grep_context {\n \tGREP_CONTEXT_HEAD,\n-\tGREP_CONTEXT_BODY,\n+\tGREP_CONTEXT_BODY\n };\n \n enum grep_header_field {\n \tGREP_HEADER_AUTHOR = 0,\n-\tGREP_HEADER_COMMITTER,\n+\tGREP_HEADER_COMMITTER\n };\n \n struct grep_pat {\n@@ -40,7 +40,7 @@ enum grep_expr_node {\n \tGREP_NODE_ATOM,\n \tGREP_NODE_NOT,\n \tGREP_NODE_AND,\n-\tGREP_NODE_OR,\n+\tGREP_NODE_OR\n };\n \n struct grep_expr {\nIndex: b/http-push.c\n===================================================================\n--- a/http-push.c\n+++ b/http-push.c\n@@ -105,7 +105,7 @@ enum transfer_state {\n \tRUN_PUT,\n \tRUN_MOVE,\n \tABORTED,\n-\tCOMPLETE,\n+\tCOMPLETE\n };\n \n struct transfer_request\nIndex: b/http-walker.c\n===================================================================\n--- a/http-walker.c\n+++ b/http-walker.c\n@@ -15,7 +15,7 @@ enum object_request_state {\n \tWAITING,\n \tABORTED,\n \tACTIVE,\n-\tCOMPLETE,\n+\tCOMPLETE\n };\n \n struct object_request\nIndex: b/imap-send.c\n===================================================================\n--- a/imap-send.c\n+++ b/imap-send.c\n@@ -230,7 +230,7 @@ enum CAPABILITY {\n \tLITERALPLUS,\n \tNAMESPACE,\n \tSTARTTLS,\n-\tAUTH_CRAM_MD5,\n+\tAUTH_CRAM_MD5\n };\n \n static const char *cap_list[] = {\nIndex: b/merge-recursive.h\n===================================================================\n--- a/merge-recursive.h\n+++ b/merge-recursive.h\n@@ -10,7 +10,7 @@ struct merge_options {\n \tenum {\n \t\tMERGE_RECURSIVE_NORMAL = 0,\n \t\tMERGE_RECURSIVE_OURS,\n-\t\tMERGE_RECURSIVE_THEIRS,\n+\t\tMERGE_RECURSIVE_THEIRS\n \t} recursive_variant;\n \tconst char *subtree_shift;\n \tunsigned buffer_output : 1;\nIndex: b/parse-options.h\n===================================================================\n--- a/parse-options.h\n+++ b/parse-options.h\n@@ -25,7 +25,7 @@ enum parse_opt_flags {\n \tPARSE_OPT_STOP_AT_NON_OPTION = 2,\n \tPARSE_OPT_KEEP_ARGV0 = 4,\n \tPARSE_OPT_KEEP_UNKNOWN = 8,\n-\tPARSE_OPT_NO_INTERNAL_HELP = 16,\n+\tPARSE_OPT_NO_INTERNAL_HELP = 16\n };\n \n enum parse_opt_option_flags {\n@@ -36,7 +36,7 @@ enum parse_opt_option_flags {\n \tPARSE_OPT_LASTARG_DEFAULT = 16,\n \tPARSE_OPT_NODASH = 32,\n \tPARSE_OPT_LITERAL_ARGHELP = 64,\n-\tPARSE_OPT_NEGHELP = 128,\n+\tPARSE_OPT_NEGHELP = 128\n };\n \n struct option;\n@@ -160,7 +160,7 @@ extern NORETURN void usage_msg_opt(const\n enum {\n \tPARSE_OPT_HELP = -1,\n \tPARSE_OPT_DONE,\n-\tPARSE_OPT_UNKNOWN,\n+\tPARSE_OPT_UNKNOWN\n };\n \n /*\nIndex: b/pretty.c\n===================================================================\n--- a/pretty.c\n+++ b/pretty.c\n@@ -828,7 +828,7 @@ static size_t format_commit_item(struct \n \tenum {\n \t\tNO_MAGIC,\n \t\tADD_LF_BEFORE_NON_EMPTY,\n-\t\tDEL_LF_BEFORE_EMPTY,\n+\t\tDEL_LF_BEFORE_EMPTY\n \t} magic = NO_MAGIC;\n \n \tswitch (placeholder[0]) {\nIndex: b/remote.h\n===================================================================\n--- a/remote.h\n+++ b/remote.h\n@@ -145,7 +145,7 @@ int branch_merge_matches(struct branch *\n enum match_refs_flags {\n \tMATCH_REFS_NONE\t\t= 0,\n \tMATCH_REFS_ALL \t\t= (1 << 0),\n-\tMATCH_REFS_MIRROR\t= (1 << 1),\n+\tMATCH_REFS_MIRROR\t= (1 << 1)\n };\n \n /* Reporting of tracking info */\nIndex: b/rerere.c\n===================================================================\n--- a/rerere.c\n+++ b/rerere.c\n@@ -153,7 +153,7 @@ static int handle_path(unsigned char *sh\n \tgit_SHA_CTX ctx;\n \tint hunk_no = 0;\n \tenum {\n-\t\tRR_CONTEXT = 0, RR_SIDE_1, RR_SIDE_2, RR_ORIGINAL,\n+\t\tRR_CONTEXT = 0, RR_SIDE_1, RR_SIDE_2, RR_ORIGINAL\n \t} hunk = RR_CONTEXT;\n \tstruct strbuf one = STRBUF_INIT, two = STRBUF_INIT;\n \tstruct strbuf buf = STRBUF_INIT;\nIndex: b/revision.c\n===================================================================\n--- a/revision.c\n+++ b/revision.c\n@@ -1781,7 +1781,7 @@ int prepare_revision_walk(struct rev_inf\n enum rewrite_result {\n \trewrite_one_ok,\n \trewrite_one_noparents,\n-\trewrite_one_error,\n+\trewrite_one_error\n };\n \n static enum rewrite_result rewrite_one(struct rev_info *revs, struct commit **pp)\nIndex: b/wt-status.h\n===================================================================\n--- a/wt-status.h\n+++ b/wt-status.h\n@@ -11,7 +11,7 @@ enum color_wt_status {\n \tWT_STATUS_CHANGED,\n \tWT_STATUS_UNTRACKED,\n \tWT_STATUS_NOBRANCH,\n-\tWT_STATUS_UNMERGED,\n+\tWT_STATUS_UNMERGED\n };\n \n enum untracked_status_type {\n\n-- \nGary V. Vaughan (gary@thewrittenword.com)\n"},{"id":"140503","messageId":"20100427135828.216091000@mlists.thewrittenword.com","threadId":"23619","inReplyTo":"20100427135708.258636000@mlists.thewrittenword.com","subject":"[patch 05/16] diff-export.patch","fromName":"Gary V. Vaughan","fromEmail":"git@mlists.thewrittenword.com","sentAt":"2010-04-27T13:57:13Z","receivedAt":"2010-04-27T13:57:13Z","isPatch":true,"sender":{"key":"git@mlists.thewrittenword.com","avatar":null},"body":"Some of the flags used with the first diff found in PATH cause the\nvendor diff to choke.\n---\n Documentation/install-webdoc.sh |    2 +-\n Makefile                        |    4 +++-\n config.mak.in                   |    1 +\n configure.ac                    |    1 +\n git-merge-one-file.sh           |    2 +-\n 5 files changed, 7 insertions(+), 3 deletions(-)\n\nIndex: b/Makefile\n===================================================================\n--- a/Makefile\n+++ b/Makefile\n@@ -287,6 +287,7 @@ export prefix bindir sharedir sysconfdir\n CC = gcc\n AR = ar\n RM = rm -f\n+DIFF = diff\n TAR = tar\n FIND = find\n INSTALL = install\n@@ -1460,7 +1461,7 @@ endif\n ALL_CFLAGS += $(BASIC_CFLAGS)\n ALL_LDFLAGS += $(BASIC_LDFLAGS)\n \n-export TAR INSTALL DESTDIR SHELL_PATH\n+export DIFF TAR INSTALL DESTDIR SHELL_PATH\n \n \n ### Build rules\n@@ -1877,6 +1878,7 @@ GIT-CFLAGS: FORCE\n GIT-BUILD-OPTIONS: FORCE\n \t@echo SHELL_PATH=\\''$(subst ','\\'',$(SHELL_PATH_SQ))'\\' >$@\n \t@echo PERL_PATH=\\''$(subst ','\\'',$(PERL_PATH_SQ))'\\' >>$@\n+\t@echo DIFF=\\''$(subst ','\\'',$(subst ','\\'',$(DIFF)))'\\' >>$@\n \t@echo TAR=\\''$(subst ','\\'',$(subst ','\\'',$(TAR)))'\\' >>$@\n \t@echo NO_CURL=\\''$(subst ','\\'',$(subst ','\\'',$(NO_CURL)))'\\' >>$@\n \t@echo NO_PERL=\\''$(subst ','\\'',$(subst ','\\'',$(NO_PERL)))'\\' >>$@\nIndex: b/configure.ac\n===================================================================\n--- a/configure.ac\n+++ b/configure.ac\n@@ -362,6 +362,7 @@ fi\n #AC_PROG_INSTALL\t\t# needs install-sh or install.sh in sources\n AC_CHECK_TOOLS(AR, [gar ar], :)\n AC_CHECK_PROGS(TAR, [gtar tar])\n+AC_CHECK_PROGS(DIFF, [gnudiff gdiff diff])\n # TCLTK_PATH will be set to some value if we want Tcl/Tk\n # or will be empty otherwise.\n if test -z \"$NO_TCLTK\"; then\nIndex: b/Documentation/install-webdoc.sh\n===================================================================\n--- a/Documentation/install-webdoc.sh\n+++ b/Documentation/install-webdoc.sh\n@@ -12,7 +12,7 @@ do\n \tthen\n \t\t: did not match\n \telif test -f \"$T/$h\" &&\n-\t   diff -u -I'Last updated [0-9][0-9]-[A-Z][a-z][a-z]-' \"$T/$h\" \"$h\"\n+\t   $DIFF -u -I'Last updated [0-9][0-9]-[A-Z][a-z][a-z]-' \"$T/$h\" \"$h\"\n \tthen\n \t\t:; # up to date\n \telse\nIndex: b/git-merge-one-file.sh\n===================================================================\n--- a/git-merge-one-file.sh\n+++ b/git-merge-one-file.sh\n@@ -107,7 +107,7 @@ case \"${1:-.}${2:-.}${3:-.}\" in\n \t\t# remove lines that are unique to ours.\n \t\torig=`git-unpack-file $2`\n \t\tsz0=`wc -c <\"$orig\"`\n-\t\tdiff -u -La/$orig -Lb/$orig $orig $src2 | git apply --no-add\n+\t\t$DIFF -u -La/$orig -Lb/$orig $orig $src2 | git apply --no-add\n \t\tsz1=`wc -c <\"$orig\"`\n \n \t\t# If we do not have enough common material, it is not\nIndex: b/config.mak.in\n===================================================================\n--- a/config.mak.in\n+++ b/config.mak.in\n@@ -8,6 +8,7 @@ LDFLAGS = @LDFLAGS@\n CC_LD_DYNPATH = @CC_LD_DYNPATH@\n AR = @AR@\n TAR = @TAR@\n+DIFF = @DIFF@\n #INSTALL = @INSTALL@\t\t# needs install-sh or install.sh in sources\n TCLTK_PATH = @TCLTK_PATH@\n \n\n-- \nGary V. Vaughan (gary@thewrittenword.com)\n"},{"id":"140508","messageId":"20100427135833.403548000@mlists.thewrittenword.com","threadId":"23619","inReplyTo":"20100427135708.258636000@mlists.thewrittenword.com","subject":"[patch 06/16] diff-test_cmp.patch","fromName":"Gary V. Vaughan","fromEmail":"git@mlists.thewrittenword.com","sentAt":"2010-04-27T13:57:14Z","receivedAt":"2010-04-27T13:57:14Z","isPatch":true,"sender":{"key":"git@mlists.thewrittenword.com","avatar":null},"body":"In tests, call test_cmp rather than raw diff where possible (i.e. if\nthe output does not go to a pipe), to allow the use of, say, 'cmp'\nwhen the default 'diff -u' is not compatible with a vendor diff.\n\nWhen that is not possible, use $DIFF, as set in GIT-BUILD-OPTIONS.\n---\n t/Makefile                      |    4 ++++\n t/t0000-basic.sh                |    2 +-\n t/t3200-branch.sh               |    4 ++--\n t/t3210-pack-refs.sh            |    8 ++++----\n t/t3903-stash.sh                |    2 +-\n t/t4002-diff-basic.sh           |    2 +-\n t/t4124-apply-ws-rule.sh        |   10 +++++-----\n t/t4127-apply-same-fn.sh        |    6 +++---\n t/t5300-pack-object.sh          |    6 +++---\n t/t5510-fetch.sh                |    2 +-\n t/t5520-pull.sh                 |    2 +-\n t/t5700-clone-reference.sh      |    8 ++++----\n t/t6000lib.sh                   |    2 +-\n t/t6001-rev-list-graft.sh       |    2 +-\n t/t6022-merge-rename.sh         |    4 ++--\n t/t7002-grep.sh                 |   16 ++++++++--------\n t/t7005-editor.sh               |    6 +++---\n t/t9200-git-cvsexportcommit.sh  |   26 +++++++++++++-------------\n t/t9400-git-cvsserver-server.sh |    2 +-\n 19 files changed, 59 insertions(+), 55 deletions(-)\n\nIndex: b/t/t0000-basic.sh\n===================================================================\n--- a/t/t0000-basic.sh\n+++ b/t/t0000-basic.sh\n@@ -280,7 +280,7 @@ $expectfilter >expected <<\\EOF\n EOF\n test_expect_success \\\n     'validate git diff-files output for a know cache/work tree state.' \\\n-    'git diff-files >current && diff >/dev/null -b current expected'\n+    'git diff-files >current && test_cmp current expected >/dev/null'\n \n test_expect_success \\\n     'git update-index --refresh should succeed.' \\\nIndex: b/t/t3200-branch.sh\n===================================================================\n--- a/t/t3200-branch.sh\n+++ b/t/t3200-branch.sh\n@@ -43,7 +43,7 @@ test_expect_success \\\n      git branch -l d/e/f &&\n \t test -f .git/refs/heads/d/e/f &&\n \t test -f .git/logs/refs/heads/d/e/f &&\n-\t diff expect .git/logs/refs/heads/d/e/f'\n+\t test_cmp expect .git/logs/refs/heads/d/e/f'\n \n test_expect_success \\\n     'git branch -d d/e/f should delete a branch and a log' \\\n@@ -222,7 +222,7 @@ test_expect_success \\\n      git checkout -b g/h/i -l master &&\n \t test -f .git/refs/heads/g/h/i &&\n \t test -f .git/logs/refs/heads/g/h/i &&\n-\t diff expect .git/logs/refs/heads/g/h/i'\n+\t test_cmp expect .git/logs/refs/heads/g/h/i'\n \n test_expect_success 'avoid ambiguous track' '\n \tgit config branch.autosetupmerge true &&\nIndex: b/t/t3210-pack-refs.sh\n===================================================================\n--- a/t/t3210-pack-refs.sh\n+++ b/t/t3210-pack-refs.sh\n@@ -28,7 +28,7 @@ test_expect_success \\\n      SHA1=`cat .git/refs/heads/a` &&\n      echo \"$SHA1 refs/heads/a\" >expect &&\n      git show-ref a >result &&\n-     diff expect result'\n+     test_cmp expect result'\n \n test_expect_success \\\n     'see if a branch still exists when packed' \\\n@@ -37,7 +37,7 @@ test_expect_success \\\n      rm -f .git/refs/heads/b &&\n      echo \"$SHA1 refs/heads/b\" >expect &&\n      git show-ref b >result &&\n-     diff expect result'\n+     test_cmp expect result'\n \n test_expect_success 'git branch c/d should barf if branch c exists' '\n      git branch c &&\n@@ -52,7 +52,7 @@ test_expect_success \\\n      git pack-refs --all --prune &&\n      echo \"$SHA1 refs/heads/e\" >expect &&\n      git show-ref e >result &&\n-     diff expect result'\n+     test_cmp expect result'\n \n test_expect_success 'see if git pack-refs --prune remove ref files' '\n      git branch f &&\n@@ -109,7 +109,7 @@ test_expect_success 'pack, prune and rep\n \tgit show-ref >all-of-them &&\n \tgit pack-refs &&\n \tgit show-ref >again &&\n-\tdiff all-of-them again\n+\ttest_cmp all-of-them again\n '\n \n test_done\nIndex: b/t/t4002-diff-basic.sh\n===================================================================\n--- a/t/t4002-diff-basic.sh\n+++ b/t/t4002-diff-basic.sh\n@@ -135,7 +135,7 @@ cmp_diff_files_output () {\n     # filesystem.\n     sed <\"$2\" >.test-tmp \\\n \t-e '/^:000000 /d;s/'$x40'\\( [MCRNDU][0-9]*\\)\t/'$z40'\\1\t/' &&\n-    diff \"$1\" .test-tmp\n+    test_cmp \"$1\" .test-tmp\n }\n \n test_expect_success \\\nIndex: b/t/t4124-apply-ws-rule.sh\n===================================================================\n--- a/t/t4124-apply-ws-rule.sh\n+++ b/t/t4124-apply-ws-rule.sh\n@@ -44,7 +44,7 @@ test_fix () {\n \tapply_patch --whitespace=fix || return 1\n \n \t# find touched lines\n-\tdiff file target | sed -n -e \"s/^> //p\" >fixed\n+\t$DIFF file target | sed -n -e \"s/^> //p\" >fixed\n \n \t# the changed lines are all expeced to change\n \tfixed_cnt=$(wc -l <fixed)\n@@ -85,14 +85,14 @@ test_expect_success setup '\n test_expect_success 'whitespace=nowarn, default rule' '\n \n \tapply_patch --whitespace=nowarn &&\n-\tdiff file target\n+\ttest_cmp file target\n \n '\n \n test_expect_success 'whitespace=warn, default rule' '\n \n \tapply_patch --whitespace=warn &&\n-\tdiff file target\n+\ttest_cmp file target\n \n '\n \n@@ -108,7 +108,7 @@ test_expect_success 'whitespace=error-al\n \n \tgit config core.whitespace -trailing,-space-before,-indent &&\n \tapply_patch --whitespace=error-all &&\n-\tdiff file target\n+\ttest_cmp file target\n \n '\n \n@@ -117,7 +117,7 @@ test_expect_success 'whitespace=error-al\n \tgit config --unset core.whitespace &&\n \techo \"target -whitespace\" >.gitattributes &&\n \tapply_patch --whitespace=error-all &&\n-\tdiff file target\n+\ttest_cmp file target\n \n '\n \nIndex: b/t/t5300-pack-object.sh\n===================================================================\n--- a/t/t5300-pack-object.sh\n+++ b/t/t5300-pack-object.sh\n@@ -147,7 +147,7 @@ test_expect_success \\\n \t    git cat-file $t $object || return 1\n \t done <obj-list\n     } >current &&\n-    diff expect current'\n+    test_cmp expect current'\n \n test_expect_success \\\n     'use packed deltified (REF_DELTA) objects' \\\n@@ -162,7 +162,7 @@ test_expect_success \\\n \t    git cat-file $t $object || return 1\n \t done <obj-list\n     } >current &&\n-    diff expect current'\n+    test_cmp expect current'\n \n test_expect_success \\\n     'use packed deltified (OFS_DELTA) objects' \\\n@@ -177,7 +177,7 @@ test_expect_success \\\n \t    git cat-file $t $object || return 1\n \t done <obj-list\n     } >current &&\n-    diff expect current'\n+    test_cmp expect current'\n \n unset GIT_OBJECT_DIRECTORY\n \nIndex: b/t/t5510-fetch.sh\n===================================================================\n--- a/t/t5510-fetch.sh\n+++ b/t/t5510-fetch.sh\n@@ -71,7 +71,7 @@ test_expect_success \"fetch test for-merg\n \t\techo \"$one_in_two\t\"\n \t} >expected &&\n \tcut -f -2 .git/FETCH_HEAD >actual &&\n-\tdiff expected actual'\n+\ttest_cmp expected actual'\n \n test_expect_success 'fetch tags when there is no tags' '\n \nIndex: b/t/t5520-pull.sh\n===================================================================\n--- a/t/t5520-pull.sh\n+++ b/t/t5520-pull.sh\n@@ -26,7 +26,7 @@ cd \"$D\"\n test_expect_success 'checking the results' '\n \ttest -f file &&\n \ttest -f cloned/file &&\n-\tdiff file cloned/file\n+\ttest_cmp file cloned/file\n '\n \n test_expect_success 'pulling into void using master:master' '\nIndex: b/t/t5700-clone-reference.sh\n===================================================================\n--- a/t/t5700-clone-reference.sh\n+++ b/t/t5700-clone-reference.sh\n@@ -48,7 +48,7 @@ test_expect_success 'that reference gets\n 'cd C &&\n echo \"0 objects, 0 kilobytes\" > expected &&\n git count-objects > current &&\n-diff expected current'\n+test_cmp expected current'\n \n cd \"$base_dir\"\n \n@@ -75,7 +75,7 @@ cd \"$base_dir\"\n test_expect_success 'that reference gets used' \\\n 'cd D && echo \"0 objects, 0 kilobytes\" > expected &&\n git count-objects > current &&\n-diff expected current'\n+test_cmp expected current'\n \n cd \"$base_dir\"\n \n@@ -100,7 +100,7 @@ test_expect_success 'that alternate to o\n 'cd C &&\n echo \"2 objects\" > expected &&\n git count-objects | cut -d, -f1 > current &&\n-diff expected current'\n+test_cmp expected current'\n \n cd \"$base_dir\"\n \n@@ -116,7 +116,7 @@ test_expect_success 'check objects expec\n 'cd D &&\n echo \"5 objects\" > expected &&\n git count-objects | cut -d, -f1 > current &&\n-diff expected current'\n+test_cmp expected current'\n \n cd \"$base_dir\"\n \nIndex: b/t/t6000lib.sh\n===================================================================\n--- a/t/t6000lib.sh\n+++ b/t/t6000lib.sh\n@@ -91,7 +91,7 @@ check_output()\n \tshift 1\n \tif eval \"$*\" | entag > $_name.actual\n \tthen\n-\t\tdiff $_name.expected $_name.actual\n+\t\ttest_cmp $_name.expected $_name.actual\n \telse\n \t\treturn 1;\n \tfi\nIndex: b/t/t6001-rev-list-graft.sh\n===================================================================\n--- a/t/t6001-rev-list-graft.sh\n+++ b/t/t6001-rev-list-graft.sh\n@@ -84,7 +84,7 @@ check () {\n \t\tgit rev-list --parents --pretty=raw $arg |\n \t\tsed -n -e 's/^commit //p' >test.actual\n \tfi\n-\tdiff test.expect test.actual\n+\ttest_cmp test.expect test.actual\n }\n \n for type in basic parents parents-raw\nIndex: b/t/t6022-merge-rename.sh\n===================================================================\n--- a/t/t6022-merge-rename.sh\n+++ b/t/t6022-merge-rename.sh\n@@ -280,7 +280,7 @@ test_expect_success 'updated working tre\n \t\techo \"BAD: should have complained\"\n \t\treturn 1\n \t}\n-\tdiff M M.saved || {\n+\ttest_cmp M M.saved || {\n \t\techo \"BAD: should have left M intact\"\n \t\treturn 1\n \t}\n@@ -301,7 +301,7 @@ test_expect_success 'updated working tre\n \t\techo \"BAD: should have complained\"\n \t\treturn 1\n \t}\n-\tdiff M M.saved || {\n+\ttest_cmp M M.saved || {\n \t\techo \"BAD: should have left M intact\"\n \t\treturn 1\n \t}\nIndex: b/t/t7002-grep.sh\n===================================================================\n--- a/t/t7002-grep.sh\n+++ b/t/t7002-grep.sh\n@@ -60,7 +60,7 @@ do\n \t\t\techo ${HC}file:5:foo_mmap bar mmap baz\n \t\t} >expected &&\n \t\tgit grep -n -w -e mmap $H >actual &&\n-\t\tdiff expected actual\n+\t\ttest_cmp expected actual\n \t'\n \n \ttest_expect_success \"grep -w $L (w)\" '\n@@ -74,7 +74,7 @@ do\n \t\t\techo ${HC}x:1:x x xx x\n \t\t} >expected &&\n \t\tgit grep -n -w -e \"x xx* x\" $H >actual &&\n-\t\tdiff expected actual\n+\t\ttest_cmp expected actual\n \t'\n \n \ttest_expect_success \"grep -w $L (y-1)\" '\n@@ -82,7 +82,7 @@ do\n \t\t\techo ${HC}y:1:y yy\n \t\t} >expected &&\n \t\tgit grep -n -w -e \"^y\" $H >actual &&\n-\t\tdiff expected actual\n+\t\ttest_cmp expected actual\n \t'\n \n \ttest_expect_success \"grep -w $L (y-2)\" '\n@@ -93,7 +93,7 @@ do\n \t\t\tcat actual\n \t\t\tfalse\n \t\telse\n-\t\t\tdiff expected actual\n+\t\t\ttest_cmp expected actual\n \t\tfi\n \t'\n \n@@ -105,14 +105,14 @@ do\n \t\t\tcat actual\n \t\t\tfalse\n \t\telse\n-\t\t\tdiff expected actual\n+\t\t\ttest_cmp expected actual\n \t\tfi\n \t'\n \n \ttest_expect_success \"grep $L (t-1)\" '\n \t\techo \"${HC}t/t:1:test\" >expected &&\n \t\tgit grep -n -e test $H >actual &&\n-\t\tdiff expected actual\n+\t\ttest_cmp expected actual\n \t'\n \n \ttest_expect_success \"grep $L (t-2)\" '\n@@ -121,7 +121,7 @@ do\n \t\t\tcd t &&\n \t\t\tgit grep -n -e test $H\n \t\t) >actual &&\n-\t\tdiff expected actual\n+\t\ttest_cmp expected actual\n \t'\n \n \ttest_expect_success \"grep $L (t-3)\" '\n@@ -130,7 +130,7 @@ do\n \t\t\tcd t &&\n \t\t\tgit grep --full-name -n -e test $H\n \t\t) >actual &&\n-\t\tdiff expected actual\n+\t\ttest_cmp expected actual\n \t'\n \n \ttest_expect_success \"grep -c $L (no /dev/null)\" '\nIndex: b/t/t7005-editor.sh\n===================================================================\n--- a/t/t7005-editor.sh\n+++ b/t/t7005-editor.sh\n@@ -38,7 +38,7 @@ test_expect_success setup '\n \ttest_commit \"$msg\" &&\n \techo \"$msg\" >expect &&\n \tgit show -s --format=%s > actual &&\n-\tdiff actual expect\n+\ttest_cmp actual expect\n \n '\n \n@@ -85,7 +85,7 @@ do\n \t\tgit --exec-path=. commit --amend &&\n \t\tgit show -s --pretty=oneline |\n \t\tsed -e \"s/^[0-9a-f]* //\" >actual &&\n-\t\tdiff actual expect\n+\t\ttest_cmp actual expect\n \t'\n done\n \n@@ -107,7 +107,7 @@ do\n \t\tgit --exec-path=. commit --amend &&\n \t\tgit show -s --pretty=oneline |\n \t\tsed -e \"s/^[0-9a-f]* //\" >actual &&\n-\t\tdiff actual expect\n+\t\ttest_cmp actual expect\n \t'\n done\n \nIndex: b/t/t9200-git-cvsexportcommit.sh\n===================================================================\n--- a/t/t9200-git-cvsexportcommit.sh\n+++ b/t/t9200-git-cvsexportcommit.sh\n@@ -63,10 +63,10 @@ test_expect_success \\\n      check_entries B \"newfile2.txt/1.1/\" &&\n      check_entries C \"newfile3.png/1.1/-kb\" &&\n      check_entries D \"newfile4.png/1.1/-kb\" &&\n-     diff A/newfile1.txt ../A/newfile1.txt &&\n-     diff B/newfile2.txt ../B/newfile2.txt &&\n-     diff C/newfile3.png ../C/newfile3.png &&\n-     diff D/newfile4.png ../D/newfile4.png\n+     test_cmp A/newfile1.txt ../A/newfile1.txt &&\n+     test_cmp B/newfile2.txt ../B/newfile2.txt &&\n+     test_cmp C/newfile3.png ../C/newfile3.png &&\n+     test_cmp D/newfile4.png ../D/newfile4.png\n      )'\n \n test_expect_success \\\n@@ -89,10 +89,10 @@ test_expect_success \\\n      check_entries D \"newfile4.png/1.2/-kb\" &&\n      check_entries E \"newfile5.txt/1.1/\" &&\n      check_entries F \"newfile6.png/1.1/-kb\" &&\n-     diff A/newfile1.txt ../A/newfile1.txt &&\n-     diff D/newfile4.png ../D/newfile4.png &&\n-     diff E/newfile5.txt ../E/newfile5.txt &&\n-     diff F/newfile6.png ../F/newfile6.png\n+     test_cmp A/newfile1.txt ../A/newfile1.txt &&\n+     test_cmp D/newfile4.png ../D/newfile4.png &&\n+     test_cmp E/newfile5.txt ../E/newfile5.txt &&\n+     test_cmp F/newfile6.png ../F/newfile6.png\n      )'\n \n # Should fail (but only on the git cvsexportcommit stage)\n@@ -137,9 +137,9 @@ test_expect_success \\\n      check_entries D \"\" &&\n      check_entries E \"newfile5.txt/1.1/\" &&\n      check_entries F \"newfile6.png/1.1/-kb\" &&\n-     diff A/newfile1.txt ../A/newfile1.txt &&\n-     diff E/newfile5.txt ../E/newfile5.txt &&\n-     diff F/newfile6.png ../F/newfile6.png\n+     test_cmp A/newfile1.txt ../A/newfile1.txt &&\n+     test_cmp E/newfile5.txt ../E/newfile5.txt &&\n+     test_cmp F/newfile6.png ../F/newfile6.png\n      )'\n \n test_expect_success \\\n@@ -155,8 +155,8 @@ test_expect_success \\\n      check_entries D \"\" &&\n      check_entries E \"newfile5.txt/1.1/\" &&\n      check_entries F \"newfile6.png/1.1/-kb\" &&\n-     diff E/newfile5.txt ../E/newfile5.txt &&\n-     diff F/newfile6.png ../F/newfile6.png\n+     test_cmp E/newfile5.txt ../E/newfile5.txt &&\n+     test_cmp F/newfile6.png ../F/newfile6.png\n      )'\n \n test_expect_success \\\nIndex: b/t/t9400-git-cvsserver-server.sh\n===================================================================\n--- a/t/t9400-git-cvsserver-server.sh\n+++ b/t/t9400-git-cvsserver-server.sh\n@@ -435,7 +435,7 @@ test_expect_success 'cvs update (-p)' '\n     rm -f failures &&\n     for i in merge no-lf empty really-empty; do\n         GIT_CONFIG=\"$git_config\" cvs update -p \"$i\" >$i.out\n-        diff $i.out ../$i >>failures 2>&1\n+        test_cmp $i.out ../$i >>failures 2>&1\n     done &&\n     test -z \"$(cat failures)\"\n '\nIndex: b/t/t3903-stash.sh\n===================================================================\n--- a/t/t3903-stash.sh\n+++ b/t/t3903-stash.sh\n@@ -81,7 +81,7 @@ test_expect_success 'drop top stash' '\n \tgit stash &&\n \tgit stash drop &&\n \tgit stash list > stashlist2 &&\n-\tdiff stashlist1 stashlist2 &&\n+\ttest_cmp stashlist1 stashlist2 &&\n \tgit stash apply &&\n \ttest 3 = $(cat file) &&\n \ttest 1 = $(git show :file) &&\nIndex: b/t/t4127-apply-same-fn.sh\n===================================================================\n--- a/t/t4127-apply-same-fn.sh\n+++ b/t/t4127-apply-same-fn.sh\n@@ -27,7 +27,7 @@ test_expect_success 'apply same filename\n \tcp same_fn same_fn2 &&\n \tgit reset --hard &&\n \tgit apply patch0 &&\n-\tdiff same_fn same_fn2\n+\ttest_cmp same_fn same_fn2\n '\n \n test_expect_success 'apply same filename with overlapping changes' '\n@@ -40,7 +40,7 @@ test_expect_success 'apply same filename\n \tcp same_fn same_fn2 &&\n \tgit reset --hard &&\n \tgit apply patch0 &&\n-\tdiff same_fn same_fn2\n+\ttest_cmp same_fn same_fn2\n '\n \n test_expect_success 'apply same new filename after rename' '\n@@ -54,7 +54,7 @@ test_expect_success 'apply same new file\n \tcp new_fn new_fn2 &&\n \tgit reset --hard &&\n \tgit apply --index patch1 &&\n-\tdiff new_fn new_fn2\n+\ttest_cmp new_fn new_fn2\n '\n \n test_expect_success 'apply same old filename after rename -- should fail.' '\nIndex: b/t/Makefile\n===================================================================\n--- a/t/Makefile\n+++ b/t/Makefile\n@@ -6,10 +6,14 @@\n -include ../config.mak\n \n #GIT_TEST_OPTS=--verbose --debug\n+GIT_TEST_CMP ?= $(DIFF)\n SHELL_PATH ?= $(SHELL)\n TAR ?= $(TAR)\n RM ?= rm -f\n \n+# Make sure test-lib.sh uses make's value of GIT_TEST_CMP\n+export GIT_TEST_CMP\n+\n # Shell quote;\n SHELL_PATH_SQ = $(subst ','\\'',$(SHELL_PATH))\n \n\n-- \nGary V. Vaughan (gary@thewrittenword.com)\n"},{"id":"140507","messageId":"20100427135838.572763000@mlists.thewrittenword.com","threadId":"23619","inReplyTo":"20100427135708.258636000@mlists.thewrittenword.com","subject":"[patch 07/16] diff-defaults.patch","fromName":"Gary V. Vaughan","fromEmail":"git@mlists.thewrittenword.com","sentAt":"2010-04-27T13:57:15Z","receivedAt":"2010-04-27T13:57:15Z","isPatch":true,"sender":{"key":"git@mlists.thewrittenword.com","avatar":null},"body":"By default the testsuite calls 'diff -u' whenever a file comparison is\ncalled for.  Unfortunately that throws a \"diff: unknown option '-u'\"\nerror for most non-GNU diffs.\n\nThis patch sets GIT_TEST_CMP to 'cmp' on all the architectures where\nthat happens.  The previous version of this patch forgot to export\nGIT_TEST_CMP from t/Makefile, which is why 'make test' continued to\nfail most tests on most architectures - test-lib.sh was falling back\non its default of `diff -u' for GIT_TEST_CMP.  This version of this\npatch shows a vast improvement in testsuite results where either GNU\ndiff is in the path at configure time, or where Makefile knows that\nGIT_TEST_CMP=cmp is required.\n---\n Makefile   |    5 +++++\n t/Makefile |    1 +\n 2 files changed, 6 insertions(+)\n\nIndex: b/Makefile\n===================================================================\n--- a/Makefile\n+++ b/Makefile\n@@ -815,18 +815,21 @@ ifeq ($(uname_S),SunOS)\n \t\tNO_STRLCPY = YesPlease\n \t\tNO_C99_FORMAT = YesPlease\n \t\tNO_STRTOUMAX = YesPlease\n+\t\tGIT_TEST_CMP = cmp\n \tendif\n \tifeq ($(uname_R),5.8)\n \t\tNO_UNSETENV = YesPlease\n \t\tNO_SETENV = YesPlease\n \t\tNO_C99_FORMAT = YesPlease\n \t\tNO_STRTOUMAX = YesPlease\n+\t\tGIT_TEST_CMP = cmp\n \tendif\n \tifeq ($(uname_R),5.9)\n \t\tNO_UNSETENV = YesPlease\n \t\tNO_SETENV = YesPlease\n \t\tNO_C99_FORMAT = YesPlease\n \t\tNO_STRTOUMAX = YesPlease\n+\t\tGIT_TEST_CMP = cmp\n \tendif\n \tINSTALL = /usr/ucb/install\n \tTAR = gtar\n@@ -903,6 +906,7 @@ ifeq ($(uname_S),AIX)\n \telse\n \t\tPTHREAD_LIBS = -lpthread\n \tendif\n+\tGIT_TEST_CMP = cmp\n endif\n ifeq ($(uname_S),GNU)\n \t# GNU/Hurd\n@@ -957,6 +961,7 @@ ifeq ($(uname_S),HP-UX)\n \tNO_HSTRERROR = YesPlease\n \tNO_SYS_SELECT_H = YesPlease\n \tSNPRINTF_RETURNS_BOGUS = YesPlease\n+\tGIT_TEST_CMP = cmp\n endif\n ifeq ($(uname_S),Windows)\n \tGIT_VERSION := $(GIT_VERSION).MSVC\nIndex: b/t/Makefile\n===================================================================\n--- a/t/Makefile\n+++ b/t/Makefile\n@@ -3,6 +3,7 @@\n # Copyright (c) 2005 Junio C Hamano\n #\n \n+-include ../config.mak.autogen\n -include ../config.mak\n \n #GIT_TEST_OPTS=--verbose --debug\n\n-- \nGary V. Vaughan (gary@thewrittenword.com)\n"},{"id":"140505","messageId":"20100427135843.788721000@mlists.thewrittenword.com","threadId":"23619","inReplyTo":"20100427135708.258636000@mlists.thewrittenword.com","subject":"[patch 08/16] host-SunOS56.patch","fromName":"Gary V. Vaughan","fromEmail":"git@mlists.thewrittenword.com","sentAt":"2010-04-27T13:57:16Z","receivedAt":"2010-04-27T13:57:16Z","isPatch":true,"sender":{"key":"git@mlists.thewrittenword.com","avatar":null},"body":"Although configure takes care of most of this, set some default values\nfor Solaris 2.6 (aka SunOS-5.6) to ensure git compiles even when\nconfigure is not used to build it.\n---\n Makefile |   10 ++++++++++\n 1 file changed, 10 insertions(+)\n\nIndex: b/Makefile\n===================================================================\n--- a/Makefile\n+++ b/Makefile\n@@ -806,6 +806,16 @@ ifeq ($(uname_S),SunOS)\n \tNO_MKDTEMP = YesPlease\n \tNO_MKSTEMPS = YesPlease\n \tNO_REGEX = YesPlease\n+\tifeq ($(uname_R),5.6)\n+\t\tNO_IPV6 = YesPlease\n+\t\tNO_SOCKADDR_STORAGE = YesPlease\n+\t\tNO_UNSETENV = YesPlease\n+\t\tNO_SETENV = YesPlease\n+\t\tNO_STRLCPY = YesPlease\n+\t\tNO_C99_FORMAT = YesPlease\n+\t\tNO_STRTOUMAX = YesPlease\n+\t\tGIT_TEST_CMP = cmp\n+\tendif\n \tifeq ($(uname_R),5.7)\n \t\tNEEDS_RESOLV = YesPlease\n \t\tNO_IPV6 = YesPlease\n\n-- \nGary V. Vaughan (gary@thewrittenword.com)\n"},{"id":"140506","messageId":"20100427135848.944844000@mlists.thewrittenword.com","threadId":"23619","inReplyTo":"20100427135708.258636000@mlists.thewrittenword.com","subject":"[patch 09/16] host-IRIX.patch","fromName":"Gary V. Vaughan","fromEmail":"git@mlists.thewrittenword.com","sentAt":"2010-04-27T13:57:17Z","receivedAt":"2010-04-27T13:57:17Z","isPatch":true,"sender":{"key":"git@mlists.thewrittenword.com","avatar":null},"body":"Irix 6.5 does not define 'sgi', but does define '__sgi'.\n\nAlso, Irix 6.5 requires _BSD_TYPES to be defined in order for the BSD\nu_short types et. al. to be declared properly.\n---\n git-compat-util.h |    3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)\n\nIndex: b/git-compat-util.h\n===================================================================\n--- a/git-compat-util.h\n+++ b/git-compat-util.h\n@@ -56,7 +56,8 @@\n # define _XOPEN_SOURCE 500\n # endif\n #elif !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__USLC__) && \\\n-      !defined(_M_UNIX) && !defined(sgi) && !defined(__DragonFly__)\n+      !defined(_M_UNIX) && !defined(sgi) && !defined(__sgi) && \\\n+      !defined(__DragonFly__)\n #define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD needs 600 for S_ISLNK() */\n #define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */\n #endif\n\n-- \nGary V. Vaughan (gary@thewrittenword.com)\n"},{"id":"140504","messageId":"20100427135854.129844000@mlists.thewrittenword.com","threadId":"23619","inReplyTo":"20100427135708.258636000@mlists.thewrittenword.com","subject":"[patch 10/16] host-HPUX10.patch","fromName":"Gary V. Vaughan","fromEmail":"git@mlists.thewrittenword.com","sentAt":"2010-04-27T13:57:18Z","receivedAt":"2010-04-27T13:57:18Z","isPatch":true,"sender":{"key":"git@mlists.thewrittenword.com","avatar":null},"body":"HP-UX 10.20 has no PREAD, and while it does support mmap(), there is\nno system MAP_FAILED definition.\n---\n Makefile          |    3 +++\n git-compat-util.h |    5 ++++-\n 2 files changed, 7 insertions(+), 1 deletion(-)\n\nIndex: b/Makefile\n===================================================================\n--- a/Makefile\n+++ b/Makefile\n@@ -971,6 +971,9 @@ ifeq ($(uname_S),HP-UX)\n \tNO_HSTRERROR = YesPlease\n \tNO_SYS_SELECT_H = YesPlease\n \tSNPRINTF_RETURNS_BOGUS = YesPlease\n+\tifeq ($(uname_R),B.10.20)\n+\t\tNO_PREAD = YesPlease\n+\tendif\n \tGIT_TEST_CMP = cmp\n endif\n ifeq ($(uname_S),Windows)\nIndex: b/git-compat-util.h\n===================================================================\n--- a/git-compat-util.h\n+++ b/git-compat-util.h\n@@ -218,7 +218,6 @@ static inline const char *skip_prefix(co\n #define PROT_READ 1\n #define PROT_WRITE 2\n #define MAP_PRIVATE 1\n-#define MAP_FAILED ((void*)-1)\n #endif\n \n #define mmap git_mmap\n@@ -247,6 +246,10 @@ extern int git_munmap(void *start, size_\n \n #endif /* NO_MMAP */\n \n+#ifndef MAP_FAILED\n+#define MAP_FAILED ((void*)-1)\n+#endif\n+\n #ifdef NO_ST_BLOCKS_IN_STRUCT_STAT\n #define on_disk_bytes(st) ((st).st_size)\n #else\n\n-- \nGary V. Vaughan (gary@thewrittenword.com)\n"},{"id":"140510","messageId":"20100427135859.269153000@mlists.thewrittenword.com","threadId":"23619","inReplyTo":"20100427135708.258636000@mlists.thewrittenword.com","subject":"[patch 11/16] host-HPUX11.patch","fromName":"Gary V. Vaughan","fromEmail":"git@mlists.thewrittenword.com","sentAt":"2010-04-27T13:57:19Z","receivedAt":"2010-04-27T13:57:19Z","isPatch":true,"sender":{"key":"git@mlists.thewrittenword.com","avatar":null},"body":"There is no nanosecond field on HPUX.\n---\n Makefile |    1 +\n 1 file changed, 1 insertion(+)\n\nIndex: b/Makefile\n===================================================================\n--- a/Makefile\n+++ b/Makefile\n@@ -970,6 +970,7 @@ ifeq ($(uname_S),HP-UX)\n \tNO_UNSETENV = YesPlease\n \tNO_HSTRERROR = YesPlease\n \tNO_SYS_SELECT_H = YesPlease\n+\tNO_NSEC = YesPlease\n \tSNPRINTF_RETURNS_BOGUS = YesPlease\n \tifeq ($(uname_R),B.10.20)\n \t\tNO_PREAD = YesPlease\n\n-- \nGary V. Vaughan (gary@thewrittenword.com)\n"},{"id":"140509","messageId":"20100427135904.486582000@mlists.thewrittenword.com","threadId":"23619","inReplyTo":"20100427135708.258636000@mlists.thewrittenword.com","subject":"[patch 12/16] host-OSF1.patch","fromName":"Gary V. Vaughan","fromEmail":"git@mlists.thewrittenword.com","sentAt":"2010-04-27T13:57:20Z","receivedAt":"2010-04-27T13:57:20Z","isPatch":true,"sender":{"key":"git@mlists.thewrittenword.com","avatar":null},"body":"Add defaults for Tru64 Unix.  Without this patch I cannot compile\ngit on Tru64 5.1.\n---\n Makefile |    6 ++++++\n 1 file changed, 6 insertions(+)\n\nIndex: b/Makefile\n===================================================================\n--- a/Makefile\n+++ b/Makefile\n@@ -734,6 +734,12 @@ EXTLIBS =\n # because maintaining the nesting to match is a pain.  If\n # we had \"elif\" things would have been much nicer...\n \n+ifeq ($(uname_S),OSF1)\n+\t# Need this for u_short definitions et al\n+\tBASIC_CFLAGS += -D_OSF_SOURCE\n+\tNO_STRTOULL = YesPlease\n+\tNO_NSEC = YesPlease\n+endif\n ifeq ($(uname_S),Linux)\n \tNO_STRLCPY = YesPlease\n \tNO_MKSTEMPS = YesPlease\n\n-- \nGary V. Vaughan (gary@thewrittenword.com)\n"},{"id":"140512","messageId":"20100427135909.635880000@mlists.thewrittenword.com","threadId":"23619","inReplyTo":"20100427135708.258636000@mlists.thewrittenword.com","subject":"[patch 13/16] no-hstrerror.patch","fromName":"Gary V. Vaughan","fromEmail":"git@mlists.thewrittenword.com","sentAt":"2010-04-27T13:57:21Z","receivedAt":"2010-04-27T13:57:21Z","isPatch":true,"sender":{"key":"git@mlists.thewrittenword.com","avatar":null},"body":"SunOS 5.6 and 5.5.1 do not have hstrerror, even in libresolv.\n\nThis patch improves the logic of the test for hstrerror, not to\nblindly assume that if there is no hstrerror in libc that it must\nexist in libresolv.\n---\n Makefile      |    1 +\n config.mak.in |    1 +\n configure.ac  |   17 ++++++++++++++---\n 3 files changed, 16 insertions(+), 3 deletions(-)\n\nIndex: b/configure.ac\n===================================================================\n--- a/configure.ac\n+++ b/configure.ac\n@@ -546,11 +546,22 @@ test -n \"$NEEDS_SOCKET\" && LIBS=\"$LIBS -\n \n #\n # Define NEEDS_RESOLV if linking with -lnsl and/or -lsocket is not enough.\n-# Notably on Solaris hstrerror resides in libresolv and on Solaris 7\n-# inet_ntop and inet_pton additionally reside there.\n-AC_CHECK_LIB([c], [hstrerror],\n+# Notably on Solaris 7 inet_ntop and inet_pton additionally reside there.\n+AC_CHECK_LIB([c], [inet_ntop],\n [NEEDS_RESOLV=],\n [NEEDS_RESOLV=YesPlease])\n+#\n+# Define NO_HSTRERROR if linking with -lresolv is not enough.\n+# Solaris 2.6 in particular has no hstrerror, even in -lresolv.\n+NO_HSTRERROR=\n+AC_CHECK_FUNC([hstrerror],\n+\t[],\n+    [AC_CHECK_LIB([resolv], [hstrerror],\n+\t    [NEEDS_RESOLV=YesPlease],\n+\t[NO_HSTRERROR=YesPlease])\n+])\n+AC_SUBST(NO_HSTRERROR)\n+\n AC_SUBST(NEEDS_RESOLV)\n test -n \"$NEEDS_RESOLV\" && LIBS=\"$LIBS -lresolv\"\n \nIndex: b/Makefile\n===================================================================\n--- a/Makefile\n+++ b/Makefile\n@@ -813,6 +813,7 @@ ifeq ($(uname_S),SunOS)\n \tNO_MKSTEMPS = YesPlease\n \tNO_REGEX = YesPlease\n \tifeq ($(uname_R),5.6)\n+\t\tNO_HSTRERROR = YesPlease\n \t\tNO_IPV6 = YesPlease\n \t\tNO_SOCKADDR_STORAGE = YesPlease\n \t\tNO_UNSETENV = YesPlease\nIndex: b/config.mak.in\n===================================================================\n--- a/config.mak.in\n+++ b/config.mak.in\n@@ -43,6 +43,7 @@ NO_D_TYPE_IN_DIRENT=@NO_D_TYPE_IN_DIRENT\n NO_SOCKADDR_STORAGE=@NO_SOCKADDR_STORAGE@\n NO_IPV6=@NO_IPV6@\n NO_C99_FORMAT=@NO_C99_FORMAT@\n+NO_HSTRERROR=@NO_HSTRERROR@\n NO_STRCASESTR=@NO_STRCASESTR@\n NO_MEMMEM=@NO_MEMMEM@\n NO_STRLCPY=@NO_STRLCPY@\n\n-- \nGary V. Vaughan (gary@thewrittenword.com)\n"},{"id":"140514","messageId":"20100427135914.801944000@mlists.thewrittenword.com","threadId":"23619","inReplyTo":"20100427135708.258636000@mlists.thewrittenword.com","subject":"[patch 14/16] no-inet_ntop.patch","fromName":"Gary V. Vaughan","fromEmail":"git@mlists.thewrittenword.com","sentAt":"2010-04-27T13:57:22Z","receivedAt":"2010-04-27T13:57:22Z","isPatch":true,"sender":{"key":"git@mlists.thewrittenword.com","avatar":null},"body":"Being careful not to overwrite the results of testing for hstrerror in\nlibresolv, also test whether inet_ntop/inet_pton are available from\nthat library.\n---\n Makefile      |    6 ++++++\n config.mak.in |    2 ++\n configure.ac  |   38 ++++++++++++++++++++++++++++++--------\n 3 files changed, 38 insertions(+), 8 deletions(-)\n\nIndex: b/Makefile\n===================================================================\n--- a/Makefile\n+++ b/Makefile\n@@ -981,6 +981,12 @@ ifeq ($(uname_S),HP-UX)\n \tSNPRINTF_RETURNS_BOGUS = YesPlease\n \tifeq ($(uname_R),B.10.20)\n \t\tNO_PREAD = YesPlease\n+\t\tNO_INET_NTOP = YesPlease\n+\t\tNO_INET_PTON = YesPlease\n+\tendif\n+\tifeq ($(uname_R),B.11.00)\n+\t\tNO_INET_NTOP = YesPlease\n+\t\tNO_INET_PTON = YesPlease\n \tendif\n \tGIT_TEST_CMP = cmp\n endif\nIndex: b/configure.ac\n===================================================================\n--- a/configure.ac\n+++ b/configure.ac\n@@ -545,11 +545,33 @@ AC_SUBST(NEEDS_SOCKET)\n test -n \"$NEEDS_SOCKET\" && LIBS=\"$LIBS -lsocket\"\n \n #\n-# Define NEEDS_RESOLV if linking with -lnsl and/or -lsocket is not enough.\n-# Notably on Solaris 7 inet_ntop and inet_pton additionally reside there.\n-AC_CHECK_LIB([c], [inet_ntop],\n-[NEEDS_RESOLV=],\n-[NEEDS_RESOLV=YesPlease])\n+# The next few tests will define NEEDS_RESOLV if linking with\n+# libresolv provides some of the functions we would normally get\n+# from libc.\n+NEEDS_RESOLV=\n+AC_SUBST(NEEDS_RESOLV)\n+#\n+# Define NO_INET_NTOP if linking with -lresolv is not enough.\n+# Solaris 2.7 in particular hos inet_ntop in -lresolv.\n+NO_INET_NTOP=\n+AC_SUBST(NO_INET_NTOP)\n+AC_CHECK_FUNC([inet_ntop],\n+\t[],\n+    [AC_CHECK_LIB([resolv], [inet_ntop],\n+\t    [NEEDS_RESOLV=YesPlease],\n+\t[NO_INET_NTOP=YesPlease])\n+])\n+#\n+# Define NO_INET_PTON if linking with -lresolv is not enough.\n+# Solaris 2.7 in particular hos inet_pton in -lresolv.\n+NO_INET_PTON=\n+AC_SUBST(NO_INET_PTON)\n+AC_CHECK_FUNC([inet_pton],\n+\t[],\n+    [AC_CHECK_LIB([resolv], [inet_pton],\n+\t    [NEEDS_RESOLV=YesPlease],\n+\t[NO_INET_PTON=YesPlease])\n+])\n #\n # Define NO_HSTRERROR if linking with -lresolv is not enough.\n # Solaris 2.6 in particular has no hstrerror, even in -lresolv.\n@@ -561,8 +583,9 @@ AC_CHECK_FUNC([hstrerror],\n \t[NO_HSTRERROR=YesPlease])\n ])\n AC_SUBST(NO_HSTRERROR)\n-\n-AC_SUBST(NEEDS_RESOLV)\n+#\n+# If any of the above tests determined that -lresolv is needed at\n+# build-time, also set it here for remaining configure-time checks.\n test -n \"$NEEDS_RESOLV\" && LIBS=\"$LIBS -lresolv\"\n \n AC_CHECK_LIB([c], [basename],\n@@ -792,7 +815,6 @@ GIT_CHECK_FUNC(mkstemps,\n [NO_MKSTEMPS=YesPlease])\n AC_SUBST(NO_MKSTEMPS)\n #\n-#\n # Define NO_MMAP if you want to avoid mmap.\n #\n # Define NO_ICONV if your libc does not properly support iconv.\nIndex: b/config.mak.in\n===================================================================\n--- a/config.mak.in\n+++ b/config.mak.in\n@@ -53,6 +53,8 @@ NO_SETENV=@NO_SETENV@\n NO_UNSETENV=@NO_UNSETENV@\n NO_MKDTEMP=@NO_MKDTEMP@\n NO_MKSTEMPS=@NO_MKSTEMPS@\n+NO_INET_NTOP=@NO_INET_NTOP@\n+NO_INET_PTON=@NO_INET_PTON@\n NO_ICONV=@NO_ICONV@\n OLD_ICONV=@OLD_ICONV@\n NO_DEFLATE_BOUND=@NO_DEFLATE_BOUND@\n\n-- \nGary V. Vaughan (gary@thewrittenword.com)\n"},{"id":"140511","messageId":"20100427135919.955263000@mlists.thewrittenword.com","threadId":"23619","inReplyTo":"20100427135708.258636000@mlists.thewrittenword.com","subject":"[patch 15/16] no-socklen_t.patch","fromName":"Gary V. Vaughan","fromEmail":"git@mlists.thewrittenword.com","sentAt":"2010-04-27T13:57:23Z","receivedAt":"2010-04-27T13:57:23Z","isPatch":true,"sender":{"key":"git@mlists.thewrittenword.com","avatar":null},"body":"SunOS 2.6 and earlier do not have a socklen_t type declaration.\n---\n Makefile      |   10 ++++++++++\n aclocal.m4    |   41 +++++++++++++++++++++++++++++++++++++++++\n config.mak.in |    1 +\n configure.ac  |    6 ++++++\n 4 files changed, 58 insertions(+)\n\nIndex: b/Makefile\n===================================================================\n--- a/Makefile\n+++ b/Makefile\n@@ -8,6 +8,9 @@ all::\n # Define SANE_TOOL_PATH to a colon-separated list of paths to prepend\n # to PATH if your tools in /usr/bin are broken.\n #\n+# Define SOCKLEN_T to a suitable type (such as 'size_t') if your\n+# system headers do not define a socklen_t type.\n+#\n # Define SNPRINTF_RETURNS_BOGUS if your are on a system which snprintf()\n # or vsnprintf() return -1 instead of number of characters which would\n # have been written to the final string if enough space had been available.\n@@ -737,6 +740,7 @@ EXTLIBS =\n ifeq ($(uname_S),OSF1)\n \t# Need this for u_short definitions et al\n \tBASIC_CFLAGS += -D_OSF_SOURCE\n+\tSOCKLEN_T = int\n \tNO_STRTOULL = YesPlease\n \tNO_NSEC = YesPlease\n endif\n@@ -813,6 +817,7 @@ ifeq ($(uname_S),SunOS)\n \tNO_MKSTEMPS = YesPlease\n \tNO_REGEX = YesPlease\n \tifeq ($(uname_R),5.6)\n+\t\tSOCKLEN_T = int\n \t\tNO_HSTRERROR = YesPlease\n \t\tNO_IPV6 = YesPlease\n \t\tNO_SOCKADDR_STORAGE = YesPlease\n@@ -980,6 +985,7 @@ ifeq ($(uname_S),HP-UX)\n \tNO_NSEC = YesPlease\n \tSNPRINTF_RETURNS_BOGUS = YesPlease\n \tifeq ($(uname_R),B.10.20)\n+\t\tSOCKLEN_T = size_t\n \t\tNO_PREAD = YesPlease\n \t\tNO_INET_NTOP = YesPlease\n \t\tNO_INET_PTON = YesPlease\n@@ -1114,6 +1120,10 @@ else\n BROKEN_PATH_FIX = '/^\\# @@BROKEN_PATH_FIX@@$$/d'\n endif\n \n+ifneq (,$(SOCKLEN_T))\n+\tBASIC_CFLAGS += -Dsocklen_t=$(SOCKLEN_T)\n+endif\n+\n ifeq ($(uname_S),Darwin)\n \tifndef NO_FINK\n \t\tifeq ($(shell test -d /sw/lib && echo y),y)\nIndex: b/configure.ac\n===================================================================\n--- a/configure.ac\n+++ b/configure.ac\n@@ -633,6 +633,12 @@ AC_SUBST(OLD_ICONV)\n ## Checks for typedefs, structures, and compiler characteristics.\n AC_MSG_NOTICE([CHECKS for typedefs, structures, and compiler characteristics])\n #\n+TYPE_SOCKLEN_T\n+case $ac_cv_type_socklen_t in\n+  yes)\t;;\n+  *)  \tAC_SUBST([SOCKLEN_T], [$git_cv_socklen_t_equiv]) ;;\n+esac\n+\n # Define NO_D_INO_IN_DIRENT if you don't have d_ino in your struct dirent.\n AC_CHECK_MEMBER(struct dirent.d_ino,\n [NO_D_INO_IN_DIRENT=],\nIndex: b/config.mak.in\n===================================================================\n--- a/config.mak.in\n+++ b/config.mak.in\n@@ -58,6 +58,7 @@ NO_INET_PTON=@NO_INET_PTON@\n NO_ICONV=@NO_ICONV@\n OLD_ICONV=@OLD_ICONV@\n NO_DEFLATE_BOUND=@NO_DEFLATE_BOUND@\n+SOCKLEN_T=@SOCKLEN_T@\n FREAD_READS_DIRECTORIES=@FREAD_READS_DIRECTORIES@\n SNPRINTF_RETURNS_BOGUS=@SNPRINTF_RETURNS_BOGUS@\n NO_PTHREADS=@NO_PTHREADS@\nIndex: b/aclocal.m4\n===================================================================\n--- /dev/null\n+++ b/aclocal.m4\n@@ -0,0 +1,41 @@\n+dnl Check for socklen_t: historically on BSD it is an int, and in\n+dnl POSIX 1g it is a type of its own, but some platforms use different\n+dnl types for the argument to getsockopt, getpeername, etc.  So we\n+dnl have to test to find something that will work.\n+AC_DEFUN([TYPE_SOCKLEN_T],\n+[\n+   AC_CHECK_TYPE([socklen_t], ,[\n+      AC_MSG_CHECKING([for socklen_t equivalent])\n+      AC_CACHE_VAL([git_cv_socklen_t_equiv],\n+      [\n+         # Systems have either \"struct sockaddr *\" or\n+         # \"void *\" as the second argument to getpeername\n+         git_cv_socklen_t_equiv=\n+         for arg2 in \"struct sockaddr\" void; do\n+            for t in int size_t unsigned long \"unsigned long\"; do\n+               AC_TRY_COMPILE([\n+                  #include <sys/types.h>\n+                  #include <sys/socket.h>\n+\n+                  int getpeername (int, $arg2 *, $t *);\n+               ],[\n+                  $t len;\n+                  getpeername(0,0,&len);\n+               ],[\n+                  git_cv_socklen_t_equiv=\"$t\"\n+                  break 2\n+               ])\n+            done\n+         done\n+\n+         if test \"x$git_cv_socklen_t_equiv\" = x; then\n+            AC_MSG_ERROR([Cannot find a type to use in place of socklen_t])\n+         fi\n+      ])\n+      AC_MSG_RESULT($git_cv_socklen_t_equiv)\n+      AC_DEFINE_UNQUOTED(socklen_t, $git_cv_socklen_t_equiv,\n+\t\t\t[type to use in place of socklen_t if not defined])],\n+      [#include <sys/types.h>\n+#include <sys/socket.h>])\n+])\n+\n\n-- \nGary V. Vaughan (gary@thewrittenword.com)\n"},{"id":"140513","messageId":"20100427135925.122499000@mlists.thewrittenword.com","threadId":"23619","inReplyTo":"20100427135708.258636000@mlists.thewrittenword.com","subject":"[patch 16/16] no-inline.patch","fromName":"Gary V. Vaughan","fromEmail":"git@mlists.thewrittenword.com","sentAt":"2010-04-27T13:57:24Z","receivedAt":"2010-04-27T13:57:24Z","isPatch":true,"sender":{"key":"git@mlists.thewrittenword.com","avatar":null},"body":"Without this patch, git does not compile correctly on HPUX 11.11 and\nearlier.\n\nCompiler support for inline is sometimes buggy, and occasionally\nmissing entirely.  This patch adds a test for inline support, and\nredefines the keyword with the preprocessor if necessary at compile\ntime.\n---\n Makefile      |   10 ++++++++++\n config.mak.in |    1 +\n configure.ac  |    6 ++++++\n 3 files changed, 17 insertions(+)\n\nIndex: b/Makefile\n===================================================================\n--- a/Makefile\n+++ b/Makefile\n@@ -11,6 +11,9 @@ all::\n # Define SOCKLEN_T to a suitable type (such as 'size_t') if your\n # system headers do not define a socklen_t type.\n #\n+# Define INLINE to a suitable substitute (such as '__inline' or '') if git\n+# fails to compile with errors about undefined inline functions or similar.\n+#\n # Define SNPRINTF_RETURNS_BOGUS if your are on a system which snprintf()\n # or vsnprintf() return -1 instead of number of characters which would\n # have been written to the final string if enough space had been available.\n@@ -972,6 +975,7 @@ ifeq ($(uname_S),IRIX64)\n \tNEEDS_LIBGEN = YesPlease\n endif\n ifeq ($(uname_S),HP-UX)\n+\tINLINE = __inline\n \tNO_IPV6=YesPlease\n \tNO_SETENV=YesPlease\n \tNO_STRCASESTR=YesPlease\n@@ -985,6 +989,8 @@ ifeq ($(uname_S),HP-UX)\n \tNO_NSEC = YesPlease\n \tSNPRINTF_RETURNS_BOGUS = YesPlease\n \tifeq ($(uname_R),B.10.20)\n+\t\t# Override HP-UX 11.x setting:\n+\t\tINLINE =\n \t\tSOCKLEN_T = size_t\n \t\tNO_PREAD = YesPlease\n \t\tNO_INET_NTOP = YesPlease\n@@ -1120,6 +1126,10 @@ else\n BROKEN_PATH_FIX = '/^\\# @@BROKEN_PATH_FIX@@$$/d'\n endif\n \n+ifneq (,$(INLINE))\n+\tBASIC_CFLAGS += -Dinline=$(INLINE)\n+endif\n+\n ifneq (,$(SOCKLEN_T))\n \tBASIC_CFLAGS += -Dsocklen_t=$(SOCKLEN_T)\n endif\nIndex: b/configure.ac\n===================================================================\n--- a/configure.ac\n+++ b/configure.ac\n@@ -327,6 +327,12 @@ GIT_PARSE_WITH(tcltk))\n AC_MSG_NOTICE([CHECKS for programs])\n #\n AC_PROG_CC([cc gcc])\n+AC_C_INLINE\n+case $ac_cv_c_inline in\n+  inline | yes | no)\t;;\n+  *)\t\t\tAC_SUBST([INLINE], [$ac_cv_c_inline]) ;;\n+esac\n+\n # which switch to pass runtime path to dynamic libraries to the linker\n AC_CACHE_CHECK([if linker supports -R], git_cv_ld_dashr, [\n    SAVE_LDFLAGS=\"${LDFLAGS}\"\nIndex: b/config.mak.in\n===================================================================\n--- a/config.mak.in\n+++ b/config.mak.in\n@@ -58,6 +58,7 @@ NO_INET_PTON=@NO_INET_PTON@\n NO_ICONV=@NO_ICONV@\n OLD_ICONV=@OLD_ICONV@\n NO_DEFLATE_BOUND=@NO_DEFLATE_BOUND@\n+INLINE=@INLINE@\n SOCKLEN_T=@SOCKLEN_T@\n FREAD_READS_DIRECTORIES=@FREAD_READS_DIRECTORIES@\n SNPRINTF_RETURNS_BOGUS=@SNPRINTF_RETURNS_BOGUS@\n\n-- \nGary V. Vaughan (gary@thewrittenword.com)\n"},{"id":"140515","messageId":"l2t40aa078e1004270708w905ae1e1lbead0f21acc70dee@mail.gmail.com","threadId":"23619","inReplyTo":"20100427135812.656626000@mlists.thewrittenword.com","subject":"Re: [patch 02/16] const-expr.patch","fromName":"Erik Faye-Lund","fromEmail":"kusmabite@googlemail.com","sentAt":"2010-04-27T14:08:24Z","receivedAt":"2010-04-27T14:08:24Z","isPatch":true,"sender":{"key":"kusmabite@gmail.com","avatar":"https://avatars.githubusercontent.com/u/47073?v=4"},"body":"On Tue, Apr 27, 2010 at 3:57 PM, Gary V. Vaughan\n<git@mlists.thewrittenword.com> wrote:\n> Index: b/unpack-trees.c\n> ===================================================================\n> --- a/unpack-trees.c\n> +++ b/unpack-trees.c\n> @@ -287,9 +287,11 @@ static void add_same_unmerged(struct cac\n>  static int unpack_index_entry(struct cache_entry *ce,\n>                              struct unpack_trees_options *o)\n>  {\n> -       struct cache_entry *src[5] = { ce, NULL, };\n> +       struct cache_entry *src[5] = { NULL, NULL };\n\nYou don't need NULL twice when the array-size is specified, it's just\nconfusing as the array has 5 elements.\n\n> Index: b/builtin/commit.c\n> ===================================================================\n> --- a/builtin/commit.c\n> +++ b/builtin/commit.c\n> @@ -717,7 +717,8 @@ static int prepare_to_commit(const char\n>\n>        if (use_editor) {\n>                char index[PATH_MAX];\n> -               const char *env[2] = { index, NULL };\n> +               const char *env[] = { NULL, NULL };\n\nWhy not \"const char *env[2] = { NULL };\", as it's shorter?\n\n> Index: b/builtin/cat-file.c\n> ===================================================================\n> --- a/builtin/cat-file.c\n> +++ b/builtin/cat-file.c\n> @@ -118,7 +118,9 @@ static int cat_one_file(int opt, const c\n>\n>                /* custom pretty-print here */\n>                if (type == OBJ_TREE) {\n> -                       const char *ls_args[3] = {\"ls-tree\", obj_name, NULL};\n> +                       const char *ls_args[3] = { NULL, NULL, NULL };\n\nAgain, you don't need to repeat NULL.\n\n-- \nErik \"kusma\" Faye-Lund\n"},{"id":"140516","messageId":"l2jd2d39d861004270710w8e5416d5iad3fa7497e620733@mail.gmail.com","threadId":"23619","inReplyTo":"20100427135904.486582000@mlists.thewrittenword.com","subject":"Re: [patch 12/16] host-OSF1.patch","fromName":"Tor Arntsen","fromEmail":"tor@spacetec.no","sentAt":"2010-04-27T14:10:56Z","receivedAt":"2010-04-27T14:10:56Z","isPatch":true,"sender":{"key":"tor@spacetec.no","avatar":null},"body":"On Tue, Apr 27, 2010 at 15:57, Gary V. Vaughan\n<git@mlists.thewrittenword.com> wrote:\n> Add defaults for Tru64 Unix.  Without this patch I cannot compile\n> git on Tru64 5.1.\n> ---\n>  Makefile |    6 ++++++\n>  1 file changed, 6 insertions(+)\n>\n> Index: b/Makefile\n> ===================================================================\n> --- a/Makefile\n> +++ b/Makefile\n> @@ -734,6 +734,12 @@ EXTLIBS =\n>  # because maintaining the nesting to match is a pain.  If\n>  # we had \"elif\" things would have been much nicer...\n>\n> +ifeq ($(uname_S),OSF1)\n> +       # Need this for u_short definitions et al\n> +       BASIC_CFLAGS += -D_OSF_SOURCE\n> +       NO_STRTOULL = YesPlease\n> +       NO_NSEC = YesPlease\n> +endif\n\nI'll try your patch for OSF1, but (ref. a patch I sent earlier, in its\nfirst revision) I needed several other changes in order to compile on\n5.1 (I also needed those you have above), e.g.\n-D_POSIX_C_SOURCE=1 NO_STRCASESTR = YesPlease NO_STRTOUMAX = YesPlease\nNO_STRLCPY = YesPlease NO_MEMMEM = YesPlease NO_UINTMAX_T = YesPlease\nNO_C99_FORMAT = YesPlease\nand\nNO_TCLTK = YesPlease\nbecause V5.1 comes with tcl/tk 8.2 and gitk refuses to start with\nanything older than 8.4.\nI had some other too, but those could be worked around by building and\ninstalling own versions of iconv, openssl, zlib, python, expat.\n\n-Tor\n"},{"id":"140517","messageId":"20100427143204.GA36271@thor.il.thewrittenword.com","threadId":"23619","inReplyTo":"l2t40aa078e1004270708w905ae1e1lbead0f21acc70dee@mail.gmail.com","subject":"Re: [patch 02/16] const-expr.patch","fromName":"Gary V. Vaughan","fromEmail":"git@mlists.thewrittenword.com","sentAt":"2010-04-27T14:32:04Z","receivedAt":"2010-04-27T14:32:04Z","isPatch":true,"sender":{"key":"git@mlists.thewrittenword.com","avatar":null},"body":"On Tue, Apr 27, 2010 at 04:08:24PM +0200, Erik Faye-Lund wrote:\n> On Tue, Apr 27, 2010 at 3:57 PM, Gary V. Vaughan\n> <git@mlists.thewrittenword.com> wrote:\n> > Index: b/unpack-trees.c\n> > ===================================================================\n> > --- a/unpack-trees.c\n> > +++ b/unpack-trees.c\n> > @@ -287,9 +287,11 @@ static void add_same_unmerged(struct cac\n> > ?static int unpack_index_entry(struct cache_entry *ce,\n> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?struct unpack_trees_options *o)\n> > ?{\n> > - ? ? ? struct cache_entry *src[5] = { ce, NULL, };\n> > + ? ? ? struct cache_entry *src[5] = { NULL, NULL };\n> \n> You don't need NULL twice when the array-size is specified, it's just\n> confusing as the array has 5 elements. [[..and 2 other similar\n> instances...]]\n\nThanks, agreed.  I won't spam the list with another copy of the patch\nwith such straight forward changes though.\n\nCheers,\n-- \nGary V. Vaughan (gary@thewrittenword.com)\n"},{"id":"140518","messageId":"20100427143912.GB36271@thor.il.thewrittenword.com","threadId":"23619","inReplyTo":"l2jd2d39d861004270710w8e5416d5iad3fa7497e620733@mail.gmail.com","subject":"Re: [patch 12/16] host-OSF1.patch","fromName":"Gary V. Vaughan","fromEmail":"git@mlists.thewrittenword.com","sentAt":"2010-04-27T14:39:12Z","receivedAt":"2010-04-27T14:39:12Z","isPatch":true,"sender":{"key":"git@mlists.thewrittenword.com","avatar":null},"body":"On Tue, Apr 27, 2010 at 04:10:56PM +0200, Tor Arntsen wrote:\n> On Tue, Apr 27, 2010 at 15:57, Gary V. Vaughan\n> <git@mlists.thewrittenword.com> wrote:\n> > Add defaults for Tru64 Unix. ?Without this patch I cannot compile\n> > git on Tru64 5.1.\n> > ---\n> > ?Makefile | ? ?6 ++++++\n> > ?1 file changed, 6 insertions(+)\n> >\n> > Index: b/Makefile\n> > ===================================================================\n> > --- a/Makefile\n> > +++ b/Makefile\n> > @@ -734,6 +734,12 @@ EXTLIBS =\n> > ?# because maintaining the nesting to match is a pain. ?If\n> > ?# we had \"elif\" things would have been much nicer...\n> >\n> > +ifeq ($(uname_S),OSF1)\n> > + ? ? ? # Need this for u_short definitions et al\n> > + ? ? ? BASIC_CFLAGS += -D_OSF_SOURCE\n> > + ? ? ? NO_STRTOULL = YesPlease\n> > + ? ? ? NO_NSEC = YesPlease\n> > +endif\n> \n> I'll try your patch for OSF1,\n\nMuch appreciated :)\n\n> but (ref. a patch I sent earlier, in its\n> first revision) I needed several other changes in order to compile on\n> 5.1 (I also needed those you have above), e.g.\n> -D_POSIX_C_SOURCE=1 NO_STRCASESTR = YesPlease NO_STRTOUMAX = YesPlease\n> NO_STRLCPY = YesPlease NO_MEMMEM = YesPlease NO_UINTMAX_T = YesPlease\n> NO_C99_FORMAT = YesPlease\n> and\n> NO_TCLTK = YesPlease\n\nIndeed, I don't mean to imply that this patch is all that is needed\nfor OSF1, merely that the changes it contains benefit only OSF1.\n\nPlease bear in mind that I build using configure, and may have missed\nsomething necessary for a make-only driven build.\n\n> because V5.1 comes with tcl/tk 8.2 and gitk refuses to start with\n> anything older than 8.4.\n> I had some other too, but those could be worked around by building and\n> installing own versions of iconv, openssl, zlib, python, expat.\n\nAck.  And since that is our business, we do indeed build git against\nour own packages of relatively cutting edge releases of prerequisite\nOS software on all our hosts (including all of the above).\n\nCheers,\n-- \nGary V. Vaughan (gary@thewrittenword.com)\n"},{"id":"140519","messageId":"p2rd2d39d861004270748q57802106gdd394cba68ce5ae7@mail.gmail.com","threadId":"23619","inReplyTo":"20100427143912.GB36271@thor.il.thewrittenword.com","subject":"Re: [patch 12/16] host-OSF1.patch","fromName":"Tor Arntsen","fromEmail":"tor@spacetec.no","sentAt":"2010-04-27T14:48:53Z","receivedAt":"2010-04-27T14:48:53Z","isPatch":true,"sender":{"key":"tor@spacetec.no","avatar":null},"body":"On Tue, Apr 27, 2010 at 16:39, Gary V. Vaughan\n<git@mlists.thewrittenword.com> wrote:\n> On Tue, Apr 27, 2010 at 04:10:56PM +0200, Tor Arntsen wrote:\n\n>> but (ref. a patch I sent earlier, in its\n>> first revision) I needed several other changes in order to compile on\n>> 5.1 (I also needed those you have above), e.g.\n>> -D_POSIX_C_SOURCE=1 NO_STRCASESTR = YesPlease NO_STRTOUMAX = YesPlease\n>> NO_STRLCPY = YesPlease NO_MEMMEM = YesPlease NO_UINTMAX_T = YesPlease\n>> NO_C99_FORMAT = YesPlease\n>> and\n>> NO_TCLTK = YesPlease\n>\n> Indeed, I don't mean to imply that this patch is all that is needed\n> for OSF1, merely that the changes it contains benefit only OSF1.\n\nI see. In that case, as I have verified that those changes are indeed\nnecessary for OSF1:\n\nAcked-by: Tor Arntsen <tor@spacetec.no>\n\n> Please bear in mind that I build using configure, and may have missed\n> something necessary for a make-only driven build.\n\nAh, Ok, that would explain it. I too found that with ./configure fewer\nchanges were needed. The patch I was working on I tested both with and\nwithout configure.  If your patch goes in I could follow up with the\nchanges needed for when not using configure, if you don't wish to\ntacke that.\n\n>> because V5.1 comes with tcl/tk 8.2 and gitk refuses to start with\n>> anything older than 8.4.\n>> I had some other too, but those could be worked around by building and\n>> installing own versions of iconv, openssl, zlib, python, expat.\n>\n> Ack.  And since that is our business, we do indeed build git against\n> our own packages of relatively cutting edge releases of prerequisite\n> OS software on all our hosts (including all of the above).\n>\n> Cheers,\n> --\n> Gary V. Vaughan (gary@thewrittenword.com)\n\n-Tor\n"},{"id":"140521","messageId":"4BD7032D.9050508@drmicha.warpmail.net","threadId":"23619","inReplyTo":"20100427135708.258636000@mlists.thewrittenword.com","subject":"Re: [patch 00/16] Portability Patches for git-1.7.1 (v4)","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2010-04-27T15:30:53Z","receivedAt":"2010-04-27T15:30:53Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Gary V. Vaughan venit, vidit, dixit 27.04.2010 15:57:\n> Here are the portability patches we needed at TWW to enable git-1.7.1\n> to compile and run on all of the wide range of Unix machines we\n> support.  These patches apply to the git-1.7.1 release,  and address\n> all of the feedback from the previous three times I posted them to\n> this list, including fixing the massive testsuite failures I was\n> experiencing and taking into account that the ss_family fixes and\n> partial GMT_CMP_TEST fixes that have been pushed since my last post of\n> this patch queue.\n\nGeneral remark: None of your patches have a s-o-b line. If you want to\nhave your patches in git you are required to sign-off on them (commit\n-s) in order to certify that you can submit them under the license terms\nof the project.\n\nYour diff -> test_cmp are certainly something we want to have in any\ncase. The code changes look ugly, honestly, making the code much less\nreadable, but it seems to be the only way to make those older platforms\nand compilers happy. (Erik pointed out some good ways to reduce the\nuglyness somewhat.)\n\nI can't test your target platform, but I would test the impact of the\ncode and test changes on mine. Do you have your series somewhere to pull\nfrom?\n\nMichael\n"},{"id":"140524","messageId":"4BD70C1A.80709@spacetec.no","threadId":"23619","inReplyTo":"20100427135823.017417000@mlists.thewrittenword.com","subject":"Re: [patch 04/16] Without this patch at least IBM VisualAge C 5.0 (I have 5.0.2) on AIX 5.1 fails to compile git.","fromName":"Tor Arntsen","fromEmail":"tor@spacetec.no","sentAt":"2010-04-27T16:08:58Z","receivedAt":"2010-04-27T16:08:58Z","isPatch":true,"sender":{"key":"tor@spacetec.no","avatar":null},"body":"On Tue, Apr 27, 2010 at 15:57, Gary V. Vaughan <git@mlists.thewrittenword.com> wrote:\n> enum style is inconsistent already, with some enums declared on one\n> line, some over 3 lines with the enum values all on the middle line,\n> sometimes with 1 enum value per line... and independently of that the\n> trailing comma is sometimes present and other times absent, often\n> mixing with/without trailing comma styles in a single file, and\n> sometimes in consecutive enum declarations.\n>\n> Clearly, omitting the comma is the more portable style, and this patch\n> changes all enum declarations to use the portable omitted dangling\n> comma style consistently.\n> ---\n>  attr.h                 |    2 +-\n>  builtin/apply.c        |    4 ++--\n>  builtin/branch.c       |    4 ++--\n>  builtin/commit.c       |    6 +++---\n>  builtin/help.c         |    2 +-\n>  builtin/mailinfo.c     |    4 ++--\n>  builtin/receive-pack.c |    2 +-\n>  builtin/remote.c       |    2 +-\n>  cache.h                |   16 ++++++++--------\n>  commit.h               |    2 +-\n>  connect.c              |    2 +-\n>  ctype.c                |    2 +-\n>  diff.h                 |    2 +-\n>  dir.c                  |    6 +++---\n>  fast-import.c          |    2 +-\n>  grep.h                 |    8 ++++----\n>  http-push.c            |    2 +-\n>  http-walker.c          |    2 +-\n>  imap-send.c            |    2 +-\n>  merge-recursive.h      |    2 +-\n>  parse-options.h        |    6 +++---\n>  pretty.c               |    2 +-\n>  remote.h               |    2 +-\n>  rerere.c               |    2 +-\n>  revision.c             |    2 +-\n>  wt-status.h            |    2 +-\n>  26 files changed, 45 insertions(+), 45 deletions(-)\n\nThe patch is against master. Are we supposed to make patches against master or maint? (I thought I saw the latter somewhere. I'm pretty new in here though..)\n\nI can confirm that master doesn't compile on AIX 5.1 with the IBM VisualAge compiler V5 (V5.0.2) without the patch above, and it does compile with the patch:\n\nTested-by: Tor Arntsen <tor@spacetec.no>\n\nbut with the following caveats:\n\n1: With the patch, it'll build with configure (and only configure), run like so:\n\n./configure --enable-pthreads=-lpthread CFLAGS=-Dinline=''\n\nIn other words, this system would also need an AIX version of the 'no-inline' patch you did for HP-UX.\n\nAnd without the --enable-pthreads=-lpthread above it'll try to link with -pthread, which won't work for this system.\n\nThe const-expr patch is also useful for AIX-5.1 / XlC V5.0.2. It does build without, but with warnings.\n\n2: The compiler cannot build on AIX 5.1 without the following additional patch (against master. maint has similar problems but files have been moved):\n\n>From a8989213b4c8baa53c14c1f227b916910265c517 Mon Sep 17 00:00:00 2001\nFrom: Tor Arntsen <tor@spacetec.no>\nDate: Tue, 27 Apr 2010 16:05:12 +0000\nSubject: [PATCH 2/2] C99 comments changed to old-style C comments\n\nSigned-off-by: Tor Arntsen <tor@spacetec.no>\n---\n builtin/blame.c        |    2 +-\n builtin/for-each-ref.c |    4 ++--\n remote.c               |    2 +-\n 3 files changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/builtin/blame.c b/builtin/blame.c\nindex fc15863..4dd4c3f 100644\n--- a/builtin/blame.c\n+++ b/builtin/blame.c\n@@ -1589,7 +1589,7 @@ static void emit_porcelain(struct scoreboard *sb, struct blame_entry *ent)\n \tstrcpy(hex, sha1_to_hex(suspect->commit->object.sha1));\n \tprintf(\"%s%c%d %d %d\\n\",\n \t       hex,\n-\t       ent->guilty ? ' ' : '*', // purely for debugging\n+\t       ent->guilty ? ' ' : '*', /* purely for debugging */\n \t       ent->s_lno + 1,\n \t       ent->lno + 1,\n \t       ent->num_lines);\ndiff --git a/builtin/for-each-ref.c b/builtin/for-each-ref.c\nindex 62be1bb..7f5011f 100644\n--- a/builtin/for-each-ref.c\n+++ b/builtin/for-each-ref.c\n@@ -549,10 +549,10 @@ static void grab_values(struct atom_value *val, int deref, struct object *obj, v\n \t\tgrab_person(\"committer\", val, deref, obj, buf, sz);\n \t\tbreak;\n \tcase OBJ_TREE:\n-\t\t// grab_tree_values(val, deref, obj, buf, sz);\n+\t\t/* grab_tree_values(val, deref, obj, buf, sz); */\n \t\tbreak;\n \tcase OBJ_BLOB:\n-\t\t// grab_blob_values(val, deref, obj, buf, sz);\n+\t\t/* grab_blob_values(val, deref, obj, buf, sz); */\n \t\tbreak;\n \tdefault:\n \t\tdie(\"Eh?  Object of type %d?\", obj->type);\ndiff --git a/remote.c b/remote.c\nindex c70181c..26ce560 100644\n--- a/remote.c\n+++ b/remote.c\n@@ -476,7 +476,7 @@ static void read_config(void)\n \tunsigned char sha1[20];\n \tconst char *head_ref;\n \tint flag;\n-\tif (default_remote_name) // did this already\n+\tif (default_remote_name) /* did this already */\n \t\treturn;\n \tdefault_remote_name = xstrdup(\"origin\");\n \tcurrent_branch = NULL;\n-- \n1.7.1.rc1.GIT\n"},{"id":"140528","messageId":"20100427171531.GA15553@progeny.tock","threadId":"23619","inReplyTo":"20100427135833.403548000@mlists.thewrittenword.com","subject":"Re: [patch 06/16] diff-test_cmp.patch","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-04-27T17:15:52Z","receivedAt":"2010-04-27T17:15:52Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Hi,\n\nGary V. Vaughan wrote:\n\n> Subject: diff-test_cmp.patch\n>\n> In tests, call test_cmp rather than raw diff where possible (i.e. if\n> the output does not go to a pipe), to allow the use of, say, 'cmp'\n> when the default 'diff -u' is not compatible with a vendor diff.\n> \n> When that is not possible, use $DIFF, as set in GIT-BUILD-OPTIONS.\n\nSign-off?  (See SubmittingPatches for what I am asking about here.)  And\nis it possible to change your mailing script to use more meaningful\nsubject lines?\n\nThis patch makes a good change, but I do not think your description\ncaptures it.  Most of the changes are from ‘diff’, not from ‘diff -u’.\nIs your bare ‘diff’ really incapable of distinguishing between\nidentical and differing files?\n\nBut using test_cmp consistently would make debugging test scripts\nwith -v much easier, since the output is more readable.\n\n> --- a/t/t0000-basic.sh\n> +++ b/t/t0000-basic.sh\n> @@ -280,7 +280,7 @@ $expectfilter >expected <<\\EOF\n>  EOF\n>  test_expect_success \\\n>      'validate git diff-files output for a know cache/work tree state.' \\\n> -    'git diff-files >current && diff >/dev/null -b current expected'\n> +    'git diff-files >current && test_cmp current expected >/dev/null'\n\nThe original ignores whitespace changes; this version does not.  It\nturns out that’s okay, but it’s worth mentioning in the commit\nmessage.  (I think we do guarantee that diff-files will not change the\nwhitespace it produces without good reason.)\n\nThe original suppressed its output, without any good reason to.  Could\nyou remove the >/dev/null while at it, to make it easier to debug?\n\n> --- a/t/t4124-apply-ws-rule.sh\n> +++ b/t/t4124-apply-ws-rule.sh\n> @@ -44,7 +44,7 @@ test_fix () {\n>  \tapply_patch --whitespace=fix || return 1\n>  \n>  \t# find touched lines\n> -\tdiff file target | sed -n -e \"s/^> //p\" >fixed\n> +\t$DIFF file target | sed -n -e \"s/^> //p\" >fixed\n>  \n>  \t# the changed lines are all expeced to change\n>  \tfixed_cnt=$(wc -l <fixed)\n\nIs this needed?  I don’t mind it, just curious.\n\nI hope some earlier patch takes care of setting DIFF in test-lib.sh.\nTests need to be usable without running them through the makefile.\n\n> --- a/t/Makefile\n> +++ b/t/Makefile\n> @@ -6,10 +6,14 @@\n>  -include ../config.mak\n>  \n>  #GIT_TEST_OPTS=--verbose --debug\n> +GIT_TEST_CMP ?= $(DIFF)\n>  SHELL_PATH ?= $(SHELL)\n>  TAR ?= $(TAR)\n>  RM ?= rm -f\n>  \n> +# Make sure test-lib.sh uses make's value of GIT_TEST_CMP\n> +export GIT_TEST_CMP\n> +\n>  # Shell quote;\n>  SHELL_PATH_SQ = $(subst ','\\'',$(SHELL_PATH))\n\nIf neither DIFF nor GIT_TEST_CMP is already set, this will export\nGIT_TEST_CMP as the empty string.  Will t/test-lib.sh treat that as\nasking for the default?  Yes --- phew.\n\nExcept for as commented above,\n\n  Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>\n\nThanks.\n"},{"id":"140529","messageId":"20100427175442.GB13626@coredump.intra.peff.net","threadId":"23619","inReplyTo":"4BD7032D.9050508@drmicha.warpmail.net","subject":"Re: [patch 00/16] Portability Patches for git-1.7.1 (v4)","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2010-04-27T17:54:42Z","receivedAt":"2010-04-27T17:54:42Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Apr 27, 2010 at 05:30:53PM +0200, Michael J Gruber wrote:\n\n> Your diff -> test_cmp are certainly something we want to have in any\n> case. The code changes look ugly, honestly, making the code much less\n> readable, but it seems to be the only way to make those older platforms\n> and compilers happy. (Erik pointed out some good ways to reduce the\n> uglyness somewhat.)\n\nI agree. We really need to make a decision here about how far backward\nwe are willing to bend for older systems.\n\nSolaris 2.6 was released in 1997, and Sun dropped support for it in\n2006, four years ago. How long do we want to continue supporting it? And\nat what cost?  If we have not hit end-of-life on it now, then what would\nbe a reasonable time? And what defines end-of-life support for git? I am\nperfectly happy to carry a Solaris 2.6 section of the Makefile forever.\nBut if it is going to cause code changes that make the code harder to\nread and maintain, is it worth it? Especially when one could probably\njust use gcc to build for those platforms. Sure, it may be less\nconvenient for the builder, and it may not generate quite as good code\nas a vendor compiler, but to what degree should we care? Those platforms\nare an extreme minority, and we need to balance their impact on code\nthat developers on every platform have to work with.\n\nFurthermore, if we do take such changes, how are we going to manage\nportability going forward? Some constructs (like non-constant\ninitializers) make the code much easier to read. People _will_ submit\npatches that use them. Is somebody going to be auto-building on all of\nthese platforms with vendor compilers to confirm that nothing is broken?\n\nIf all of these questions seem like rhetorical \"I am trying to convince\nyou these patches aren't a good idea\" questions, they're not meant as\nsuch. I think these are serious questions that need to be answered when\nevaluating portability patches.\n\n-Peff\n"},{"id":"140539","messageId":"m2iq7cejsh.fsf@igel.home","threadId":"23619","inReplyTo":"20100427175442.GB13626@coredump.intra.peff.net","subject":"Re: [patch 00/16] Portability Patches for git-1.7.1 (v4)","fromName":"Andreas Schwab","fromEmail":"schwab@linux-m68k.org","sentAt":"2010-04-27T20:13:02Z","receivedAt":"2010-04-27T20:13:02Z","isPatch":true,"sender":{"key":"schwab@linux-m68k.org","avatar":"https://avatars.githubusercontent.com/u/2175493?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> Furthermore, if we do take such changes, how are we going to manage\n> portability going forward? Some constructs (like non-constant\n> initializers) make the code much easier to read. People _will_ submit\n> patches that use them. Is somebody going to be auto-building on all of\n> these platforms with vendor compilers to confirm that nothing is broken?\n\nYou can use \"gcc -pedantic\" to find these portability problems.\n\nAndreas.\n\n-- \nAndreas Schwab, schwab@linux-m68k.org\nGPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5\n\"And now for something completely different.\"\n"},{"id":"140561","messageId":"20100428020816.GC16107@coredump.intra.peff.net","threadId":"23619","inReplyTo":"m2iq7cejsh.fsf@igel.home","subject":"Re: [patch 00/16] Portability Patches for git-1.7.1 (v4)","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2010-04-28T02:08:16Z","receivedAt":"2010-04-28T02:08:16Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Apr 27, 2010 at 10:13:02PM +0200, Andreas Schwab wrote:\n\n> Jeff King <peff@peff.net> writes:\n> \n> > Furthermore, if we do take such changes, how are we going to manage\n> > portability going forward? Some constructs (like non-constant\n> > initializers) make the code much easier to read. People _will_ submit\n> > patches that use them. Is somebody going to be auto-building on all of\n> > these platforms with vendor compilers to confirm that nothing is broken?\n> \n> You can use \"gcc -pedantic\" to find these portability problems.\n\nSort of. It reports much more than we necessarily need to fix to remain\nportable to even remotely sane platforms. So it's a nice tool for\nfinding problems, but somebody needs to do the work of figuring out\nwhich are important and which are not, and then periodically run with\n-pedantic and sort out the results.\n\n-Peff\n"},{"id":"140572","messageId":"20100428084027.GC36271@thor.il.thewrittenword.com","threadId":"23619","inReplyTo":"4BD70C1A.80709@spacetec.no","subject":"Re: [patch 04/16] Without this patch at least IBM VisualAge C 5.0 (I have 5.0.2) on AIX 5.1 fails to compile git.","fromName":"Gary V. Vaughan","fromEmail":"git@mlists.thewrittenword.com","sentAt":"2010-04-28T08:40:27Z","receivedAt":"2010-04-28T08:40:27Z","isPatch":true,"sender":{"key":"git@mlists.thewrittenword.com","avatar":null},"body":"On Tue, Apr 27, 2010 at 06:08:58PM +0200, Tor Arntsen wrote:\n> On Tue, Apr 27, 2010 at 15:57, Gary V. Vaughan <git@mlists.thewrittenword.com> wrote:\n> > enum style is inconsistent already, with some enums declared on one\n> > line, some over 3 lines with the enum values all on the middle line,\n> > sometimes with 1 enum value per line... and independently of that the\n> > trailing comma is sometimes present and other times absent, often\n> > mixing with/without trailing comma styles in a single file, and\n> > sometimes in consecutive enum declarations.\n> >\n> > Clearly, omitting the comma is the more portable style, and this patch\n> > changes all enum declarations to use the portable omitted dangling\n> > comma style consistently.\n> \n> The patch is against master. Are we supposed to make patches against\n> master or maint? (I thought I saw the latter somewhere. I'm pretty\n> new in here though..)\n\nNo, the patch is against the latest 7.1.1 stable release (not yet shown\non the website last time I checked, however):\n\n\thttp://www.kernel.org/pub/software/scm/git/git-1.7.1.tar.bz2\n\n> I can confirm that master doesn't compile on AIX 5.1 with the IBM\n> VisualAge compiler V5 (V5.0.2) without the patch above, and it does\n> compile with the patch:\n> \n> Tested-by: Tor Arntsen <tor@spacetec.no>\n\nThanks for testing.\n\n> but with the following caveats:\n> \n> 1: With the patch, it'll build with configure (and only configure),\n> run like so:\n> \n> ./configure --enable-pthreads=-lpthread CFLAGS=-Dinline=''\n\nThe pthread issue is taken care of by pthread.patch (later in this\nseries), which also adds defaults to Makefile.\n\nThe inline issue is taken care of by no-inline.patch (the last patch\nin this series), for configure based builds at least.\n\n> In other words, this system would also need an AIX version of the\n> 'no-inline' patch you did for HP-UX.\n\nThis should be as simple as adding the following to the appropriate\nAIX defaults section of Makefile:\n\n        ifeq ($(shell expr \"$(uname_V).$(uname_R)\" : '5\\.1'),3)\n                INLINE=''\n        endif\n\nBut, honestly (with the obvious exception of the few architectures\nthat don't have access to a posix shell and command line tools) I\nreally don't see the value of burning perfectly good development time\nby trying to maintain 2 separate build systems... irrespective of what\nits detractors would like you to believe, configure is specifically\ndesigned to discover things like this empirically *on the actual build\nmachine* - no matter what particular combination of libc, compiler,\noperating system and/or patchlevels a build host happens to be running\non the day of the build: trying to maintain an accurate database of\nwhat quirks are present in all combinations of the above is a far more\ndifficult, likely impossible, undertaking.\n\n> And without the --enable-pthreads=-lpthread above it'll try to link\n> with -pthread, which won't work for this system.\n\nDid you apply the whole series of patches?  If so, then it is a bug in\nmy pthread.patch if --enable-pthreads=-lpthreads is necessary.  This\nconfigure line builds successfully on all the architectures I have\naccess to (note, pthread support is probed automatically by configure):\n\n  {SHELL} ./configure CC=\"${CC:-gcc}\" CFLAGS=\"${CFLAGS:--O2}\" \\\n  CPPFLAGS=\"-I${SB_VAR_CURL_INC} \\\n  ${SB_VAR_LIBEXPAT+-I${SB_VAR_LIBEXPAT_INC}} \\\n  ${SB_VAR_LIBZ+-I${SB_VAR_LIBZ_INC}} ${CPPFLAGS+${CPPFLAGS}}\" \\\n  LDFLAGS=\"${SB_VAR_GCC_RT+-L${SB_VAR_GCC_RT_LIB}} \\\n  ${SB_VAR_LIBEXPAT+-L${SB_VAR_LIBEXPAT_LIB}} \\\n  ${SB_VAR_LIBZ+-L${SB_VAR_LIBZ_LIB}} \\\n  -L${SB_VAR_CURL_LIB} \\\n  ${SB_VAR_GCC_RT+${CC_LD_RT}${SB_VAR_GCC_RT_LIB}} \\\n  ${SB_VAR_LIBEXPAT+${CC_LD_RT}${SB_VAR_LIBEXPAT_LIB}} \\\n  ${SB_VAR_LIBZ+${CC_LD_RT}${SB_VAR_LIBZ_LIB}} \\\n  ${CC_LD_RT}${SB_VAR_CURL_LIB} ${LDFLAGS+${LDFLAGS}}\" \\\n  ${SB_VAR_LIBEXPAT+--with-expat} \\\n  ${SB_VAR_LIBICONV+--with-iconv=${SB_VAR_LIBICONV}} \\\n  --without-openssl --with-curl ${ARGS+\"${ARGS}\"} \\\n  --prefix=${SB_INSTALL_PREFIX}\n\nwhere ${SB_VAR_...LIB} and ${SB_VAR_...INC} hold the paths to the\nrelevant libdir and includedir directories for the named packages,\n${CC_LD_RT} is \"-Wl,--rpath,\" or equivalent, and SB_VAR_GCC_RT_LIB\nrefers to the GCC runtime and is predicated on whether gcc is used\n(i.e. on Linux).\n\n> The const-expr patch is also useful for AIX-5.1 / XlC V5.0.2. It\n> does build without, but with warnings.\n\nIRIX6.5 however fails to compile altogether without const-expr.patch.\n\n> 2: The compiler cannot build on AIX 5.1 without the following\n> additional patch (against master. maint has similar problems but\n> files have been moved):\n\nI maintained a similar patch for our packaging of older git releases\ntoo, but noticed that it wasn't necessary on our machines anymore...\nperhaps recent compiler patches on our hosts have relaxed the\nrequirement for non-C++ comment syntax?\n\nHowever, I do confirm that this is a problem I have encountered in the\npast.\n\n> From a8989213b4c8baa53c14c1f227b916910265c517 Mon Sep 17 00:00:00 2001\n> From: Tor Arntsen <tor@spacetec.no>\n> Date: Tue, 27 Apr 2010 16:05:12 +0000\n> Subject: [PATCH 2/2] C99 comments changed to old-style C comments\n> \n> Signed-off-by: Tor Arntsen <tor@spacetec.no>\n> ---\n>  builtin/blame.c        |    2 +-\n>  builtin/for-each-ref.c |    4 ++--\n>  remote.c               |    2 +-\n>  3 files changed, 4 insertions(+), 4 deletions(-)\n\nCheers,\n-- \nGary V. Vaughan (gary@thewrittenword.com)\n"},{"id":"140573","messageId":"4BD7F81A.4030906@spacetec.no","threadId":"23619","inReplyTo":"20100428084027.GC36271@thor.il.thewrittenword.com","subject":"Re: [patch 04/16] Without this patch at least IBM VisualAge C 5.0 (I have 5.0.2) on AIX 5.1 fails to compile git.","fromName":"Tor Arntsen","fromEmail":"tor@spacetec.no","sentAt":"2010-04-28T08:55:54Z","receivedAt":"2010-04-28T08:55:54Z","isPatch":true,"sender":{"key":"tor@spacetec.no","avatar":null},"body":"Gary V. Vaughan wrote:\n> On Tue, Apr 27, 2010 at 06:08:58PM +0200, Tor Arntsen wrote:\n>> On Tue, Apr 27, 2010 at 15:57, Gary V. Vaughan <git@mlists.thewrittenword.com> wrote:\n>>> enum style is inconsistent already, with some enums declared on one\n>>> line, some over 3 lines with the enum values all on the middle line,\n>>> sometimes with 1 enum value per line... and independently of that the\n>>> trailing comma is sometimes present and other times absent, often\n>>> mixing with/without trailing comma styles in a single file, and\n>>> sometimes in consecutive enum declarations.\n>>>\n>>> Clearly, omitting the comma is the more portable style, and this patch\n>>> changes all enum declarations to use the portable omitted dangling\n>>> comma style consistently.\n>> The patch is against master. Are we supposed to make patches against\n>> master or maint? (I thought I saw the latter somewhere. I'm pretty\n>> new in here though..)\n> \n> No, the patch is against the latest 7.1.1 stable release (not yet shown\n> on the website last time I checked, however):\n> \n> \thttp://www.kernel.org/pub/software/scm/git/git-1.7.1.tar.bz2\n\nOk. That would correspond to master from git anyway. I make my patches\nagainst a git checkout, and I was just throwing out the question to\nthe general audience, for my own knowledge.\n\n[..]\n with -pthread, which won't work for this system.\n> \n> Did you apply the whole series of patches?  If so, then it is a bug in\n> my pthread.patch if --enable-pthreads=-lpthreads is necessary.  This\n> configure line builds successfully on all the architectures I have\n> access to (note, pthread support is probed automatically by configure):\n\nNo, I only applied and tested the enum patch. I looked through those\npatches I mentioned though. Looks fine to me.\n\n[..]\n>> 2: The compiler cannot build on AIX 5.1 without the following\n>> additional patch (against master. maint has similar problems but\n>> files have been moved):\n> \n> I maintained a similar patch for our packaging of older git releases\n> too, but noticed that it wasn't necessary on our machines anymore...\n> perhaps recent compiler patches on our hosts have relaxed the\n> requirement for non-C++ comment syntax?\n\nThat could be. I have this exact version (5.0.2) because of software\nwe build for some customers. We need to have exactly the same compilers\n(as we provide source as well). There are always certain bugs and issues\nwith different versions of compilers, so we and the customers figure out\nthe issues with them and then rigidly stick to a specific version fromthen\non (until we may have to evaluate another version, for different reasons).\n\n> However, I do confirm that this is a problem I have encountered in the\n> past.\n\nIf you check the Git log for the git repo you'll see that there have\nbeen similar patches in the past, it looks like the C99 comments fixed\nin my patch has just managed to sneak by since then.\n\n-Tor\n\n>> From a8989213b4c8baa53c14c1f227b916910265c517 Mon Sep 17 00:00:00 2001\n>> From: Tor Arntsen <tor@spacetec.no>\n>> Date: Tue, 27 Apr 2010 16:05:12 +0000\n>> Subject: [PATCH 2/2] C99 comments changed to old-style C comments\n>>\n>> Signed-off-by: Tor Arntsen <tor@spacetec.no>\n>> ---\n>>  builtin/blame.c        |    2 +-\n>>  builtin/for-each-ref.c |    4 ++--\n>>  remote.c               |    2 +-\n>>  3 files changed, 4 insertions(+), 4 deletions(-)\n> \n> Cheers,\n"},{"id":"140574","messageId":"20100428090045.GD36271@thor.il.thewrittenword.com","threadId":"23619","inReplyTo":"20100427171531.GA15553@progeny.tock","subject":"Re: [patch 06/16] diff-test_cmp.patch","fromName":"Gary V. Vaughan","fromEmail":"git@mlists.thewrittenword.com","sentAt":"2010-04-28T09:00:46Z","receivedAt":"2010-04-28T09:00:46Z","isPatch":true,"sender":{"key":"git@mlists.thewrittenword.com","avatar":null},"body":"On Tue, Apr 27, 2010 at 12:15:52PM -0500, Jonathan Nieder wrote:\n> Hi,\n> \n> Gary V. Vaughan wrote:\n> \n> > Subject: diff-test_cmp.patch\n> >\n> > In tests, call test_cmp rather than raw diff where possible (i.e. if\n> > the output does not go to a pipe), to allow the use of, say, 'cmp'\n> > when the default 'diff -u' is not compatible with a vendor diff.\n> > \n> > When that is not possible, use $DIFF, as set in GIT-BUILD-OPTIONS.\n> \n> Sign-off?  (See SubmittingPatches for what I am asking about here.)\n\nAh, okay.  I didn't read carefully enough. Sorry.\n\nCan I add a Sign-off message to each patch subthread?  Or do you need\nme to resubmit the entire series?\n\n> And is it possible to change your mailing script to use more\n> meaningful subject lines?\n\nSure.  What is preferable?  As short a sentence summarising the fixed\nissue as I can muster? (Like SuSE Linux, we use quilt to manage and\nsubmit our patch stacks... git seems to require hosting the entire\nhistory of each project which is too heavyweight for the 1000's of\npackages we build - if git provides the means to store just the head\nof an upstream release branch along with our patch stacks on local\ndisk, I would love to be proven wrong here).\n\n> This patch makes a good change, but I do not think your description\n> captures it.  Most of the changes are from ???diff???, not from ???diff -u???.\n> Is your bare ???diff??? really incapable of distinguishing between\n> identical and differing files?\n\nA good point, thanks.  I think the scope has crept since I first\nstarted applying such a patch to earlier releases of git in our\npackage tree.\n\n> But using test_cmp consistently would make debugging test scripts\n> with -v much easier, since the output is more readable.\n> \n> > --- a/t/t0000-basic.sh\n> > +++ b/t/t0000-basic.sh\n> > @@ -280,7 +280,7 @@ $expectfilter >expected <<\\EOF\n> >  EOF\n> >  test_expect_success \\\n> >      'validate git diff-files output for a know cache/work tree state.' \\\n> > -    'git diff-files >current && diff >/dev/null -b current expected'\n> > +    'git diff-files >current && test_cmp current expected >/dev/null'\n> \n> The original ignores whitespace changes; this version does not.  It\n> turns out that???s okay, but it???s worth mentioning in the commit\n> message.  (I think we do guarantee that diff-files will not change the\n> whitespace it produces without good reason.)\n\nOkay, I'll rewrite the patch headers where they have bit-rotted.\nMaybe in combination with the missing Signed-off-by: headers and\nunsuitable Subject headers I need to amend and resubmit the whole\npatch series again?\n\n> The original suppressed its output, without any good reason to.  Could\n> you remove the >/dev/null while at it, to make it easier to debug?\n> \n> > --- a/t/t4124-apply-ws-rule.sh\n> > +++ b/t/t4124-apply-ws-rule.sh\n> > @@ -44,7 +44,7 @@ test_fix () {\n> >  \tapply_patch --whitespace=fix || return 1\n> >  \n> >  \t# find touched lines\n> > -\tdiff file target | sed -n -e \"s/^> //p\" >fixed\n> > +\t$DIFF file target | sed -n -e \"s/^> //p\" >fixed\n> >  \n> >  \t# the changed lines are all expeced to change\n> >  \tfixed_cnt=$(wc -l <fixed)\n> \n> Is this needed?  I don???t mind it, just curious.\n\nProbably not, though I prefer the consistency rather than having to\nconsider diff vs $DIFF at every occurence.  libtool has had numerous\nsilly bugs tickled by making the wrong choice between echo, $echo,\n$lt_echo and $ECHO in rarely exercised corners of the code.\n\n> I hope some earlier patch takes care of setting DIFF in test-lib.sh.\n> Tests need to be usable without running them through the makefile.\n\nUnfortunately, that is not the case in 7.1.1.  This is it:\n\nGIT_TEST_CMP=${GIT_TEST_CMP:-diff -u}\n\nThe obvious fix would be to use:\n\n: ${DIFF=@DIFF@}\n: ${GIT_TEST_CMP=@DIFF@ -u}\n\nAnd substitute at configure time.  Makefile only builds will require\nadditional support though.\n\n> > --- a/t/Makefile\n> > +++ b/t/Makefile\n> > @@ -6,10 +6,14 @@\n> >  -include ../config.mak\n> >  \n> >  #GIT_TEST_OPTS=--verbose --debug\n> > +GIT_TEST_CMP ?= $(DIFF)\n> >  SHELL_PATH ?= $(SHELL)\n> >  TAR ?= $(TAR)\n> >  RM ?= rm -f\n> >  \n> > +# Make sure test-lib.sh uses make's value of GIT_TEST_CMP\n> > +export GIT_TEST_CMP\n> > +\n> >  # Shell quote;\n> >  SHELL_PATH_SQ = $(subst ','\\'',$(SHELL_PATH))\n> \n> If neither DIFF nor GIT_TEST_CMP is already set, this will export\n> GIT_TEST_CMP as the empty string.  Will t/test-lib.sh treat that as\n> asking for the default?  Yes --- phew.\n\nThat change was just added to my patch yesterday, to fix the massive\ntestsuite failures I had previously experienced.\n\n>   Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>\n\nMuch appreciated!\n\nCheers,\n-- \nGary V. Vaughan (gary@thewrittenword.com)\n"},{"id":"140575","messageId":"20100428090736.GE36271@thor.il.thewrittenword.com","threadId":"23619","inReplyTo":"p2rd2d39d861004270748q57802106gdd394cba68ce5ae7@mail.gmail.com","subject":"Re: [patch 12/16] host-OSF1.patch","fromName":"Gary V. Vaughan","fromEmail":"git@mlists.thewrittenword.com","sentAt":"2010-04-28T09:07:37Z","receivedAt":"2010-04-28T09:07:37Z","isPatch":true,"sender":{"key":"git@mlists.thewrittenword.com","avatar":null},"body":"On Tue, Apr 27, 2010 at 04:48:53PM +0200, Tor Arntsen wrote:\n> On Tue, Apr 27, 2010 at 16:39, Gary V. Vaughan\n> <git@mlists.thewrittenword.com> wrote:\n> > On Tue, Apr 27, 2010 at 04:10:56PM +0200, Tor Arntsen wrote:\n> \n> >> but (ref. a patch I sent earlier, in its\n> >> first revision) I needed several other changes in order to compile on\n> >> 5.1 (I also needed those you have above), e.g.\n> >> -D_POSIX_C_SOURCE=1 NO_STRCASESTR = YesPlease NO_STRTOUMAX = YesPlease\n> >> NO_STRLCPY = YesPlease NO_MEMMEM = YesPlease NO_UINTMAX_T = YesPlease\n> >> NO_C99_FORMAT = YesPlease\n> >> and\n> >> NO_TCLTK = YesPlease\n> >\n> > Indeed, I don't mean to imply that this patch is all that is needed\n> > for OSF1, merely that the changes it contains benefit only OSF1.\n> \n> I see. In that case, as I have verified that those changes are indeed\n> necessary for OSF1:\n> \n> Acked-by: Tor Arntsen <tor@spacetec.no>\n\nWow, all these different pseudo-headers are starting to make my head\nspin! ;)\n\n> > Please bear in mind that I build using configure, and may have missed\n> > something necessary for a make-only driven build.\n> \n> Ah, Ok, that would explain it. I too found that with ./configure fewer\n> changes were needed. The patch I was working on I tested both with and\n> without configure.  If your patch goes in I could follow up with the\n> changes needed for when not using configure, if you don't wish to\n> tacke that.\n\nMuch appreciated, thank you.\n\nUnless it's a requirement for having these patches accepted upstream,\nthen I'd rather not worry about the make only builds... I've mentioned\nelsewhere that the idea of reliable builds predicated on the idea that\nit is possible to maintain a static database of what options are\nrequired on each combination of libc/cc/os/patchlevel with any kind of\nreliability seems fundamentally flawed to me.\n\nCheers,\n-- \nGary V. Vaughan (gary@thewrittenword.com)\n"},{"id":"140576","messageId":"20100428091922.GF36271@thor.il.thewrittenword.com","threadId":"23619","inReplyTo":"20100428020816.GC16107@coredump.intra.peff.net","subject":"Re: [patch 00/16] Portability Patches for git-1.7.1 (v4)","fromName":"Gary V. Vaughan","fromEmail":"git@mlists.thewrittenword.com","sentAt":"2010-04-28T09:19:22Z","receivedAt":"2010-04-28T09:19:22Z","isPatch":true,"sender":{"key":"git@mlists.thewrittenword.com","avatar":null},"body":"Hi Jeff,\n\nOn Tue, Apr 27, 2010 at 10:08:16PM -0400, Jeff King wrote:\n> On Tue, Apr 27, 2010 at 10:13:02PM +0200, Andreas Schwab wrote:\n> > Jeff King <peff@peff.net> writes:\n> > \n> > > Furthermore, if we do take such changes, how are we going to manage\n> > > portability going forward? Some constructs (like non-constant\n> > > initializers) make the code much easier to read. People _will_ submit\n> > > patches that use them. Is somebody going to be auto-building on all of\n> > > these platforms with vendor compilers to confirm that nothing is broken?\n\nAnd that's fine.  People who are trying to build will notice the\nbreakage on their platforms and likely submit patches in due course.\nA portability guide in the source tree might help reduce the code\nchurn, I'd even be willing to draft it for you if you agree that it\nwould help. I think it would be just a few hundred words setting out\nthe 5 or 6 problems that I have to patch over-and-over when I port OS\npackages to our older architectures...\n\n> > You can use \"gcc -pedantic\" to find these portability problems.\n> \n> Sort of. It reports much more than we necessarily need to fix to remain\n> portable to even remotely sane platforms. So it's a nice tool for\n> finding problems, but somebody needs to do the work of figuring out\n> which are important and which are not, and then periodically run with\n> -pedantic and sort out the results.\n\nIMHO, unless it is a significant impediment to development of git,\nthen it makes sense to support any platform for which you have someone\nprepared to maintain the port.\n\nWhile our release cycle revs only 2 or 3 times per year, for as long\nas I have customers who want me to port to their platforms, I will\ncontinue to patch support for those platforms into our packages.  I\nthink that it would be a shame if those ports were kept hidden away on\nour servers and only benefited our customers rather than integrated\ninto upstream for the benefit of the whole community.\n\nSo the real question is whether uglification of unportable code is so\nunacceptable that git wants to wilfully reject external maintenance of\nports to end-of-life but none-the-less deployed and active\narchitectures?\n\nCheers,\n-- \nGary V. Vaughan (gary@thewrittenword.com)\n"},{"id":"140579","messageId":"20100428092735.GG36271@thor.il.thewrittenword.com","threadId":"23619","inReplyTo":"4BD7032D.9050508@drmicha.warpmail.net","subject":"Re: [patch 00/16] Portability Patches for git-1.7.1 (v4)","fromName":"Gary V. Vaughan","fromEmail":"gary@thewrittenword.com","sentAt":"2010-04-28T09:27:35Z","receivedAt":"2010-04-28T09:27:35Z","isPatch":true,"sender":{"key":"gary@thewrittenword.com","avatar":null},"body":"Hi Michael,\n\nOn Tue, Apr 27, 2010 at 05:30:53PM +0200, Michael J Gruber wrote:\n> Gary V. Vaughan venit, vidit, dixit 27.04.2010 15:57:\n> > Here are the portability patches we needed at TWW to enable git-1.7.1\n> > to compile and run on all of the wide range of Unix machines we\n> > support.  These patches apply to the git-1.7.1 release,  and address\n> > all of the feedback from the previous three times I posted them to\n> > this list, including fixing the massive testsuite failures I was\n> > experiencing and taking into account that the ss_family fixes and\n> > partial GMT_CMP_TEST fixes that have been pushed since my last post of\n> > this patch queue.\n> \n> General remark: None of your patches have a s-o-b line. If you want to\n> have your patches in git you are required to sign-off on them (commit\n> -s) in order to certify that you can submit them under the license terms\n> of the project.\n\nI didn't read SubmittingPatches carefully enough, sorry.  If\nnecessary, I can resubmit with the additional line?\n\n> Your diff -> test_cmp are certainly something we want to have in any\n> case. The code changes look ugly, honestly, making the code much less\n> readable, but it seems to be the only way to make those older platforms\n> and compilers happy. (Erik pointed out some good ways to reduce the\n> uglyness somewhat.)\n\nI think only the const-expr.patch changes are seriously ugly... but\nthen I'm perhaps used to staring at portable code all day.\n\n> I can't test your target platform, but I would test the impact of the\n> code and test changes on mine. Do you have your series somewhere to pull\n> from?\n\nI'm afraid not, though I can send you (off-list) a zip of the patch\nseries and a quiltrc to apply using quilt or repeated calls to gnu\npotch, or if you prefer, a sumo-patch containing all the changes in\none file for gnu patch?\n\nCheers,\n-- \nGary V. Vaughan (gary@thewrittenword.com)\n"},{"id":"140578","messageId":"20100428093205.GH36271@thor.il.thewrittenword.com","threadId":"23619","inReplyTo":"4BD7032D.9050508@drmicha.warpmail.net","subject":"Re: [patch 00/16] Portability Patches for git-1.7.1 (v4)","fromName":"Gary V. Vaughan","fromEmail":"git@mlists.thewrittenword.com","sentAt":"2010-04-28T09:32:05Z","receivedAt":"2010-04-28T09:32:05Z","isPatch":true,"sender":{"key":"git@mlists.thewrittenword.com","avatar":null},"body":"Hi Michael,\n\nOn Tue, Apr 27, 2010 at 05:30:53PM +0200, Michael J Gruber wrote:\n> Gary V. Vaughan venit, vidit, dixit 27.04.2010 15:57:                         \n> > Here are the portability patches we needed at TWW to enable git-1.7.1       \n> > to compile and run on all of the wide range of Unix machines we             \n> > support.  These patches apply to the git-1.7.1 release,  and address        \n> > all of the feedback from the previous three times I posted them to          \n> > this list, including fixing the massive testsuite failures I was            \n> > experiencing and taking into account that the ss_family fixes and           \n> > partial GMT_CMP_TEST fixes that have been pushed since my last post of      \n> > this patch queue.                                                           \n>                                                                               \n> General remark: None of your patches have a s-o-b line. If you want to        \n> have your patches in git you are required to sign-off on them (commit         \n> -s) in order to certify that you can submit them under the license terms      \n> of the project.                                                               \n\nI didn't read SubmittingPatches carefully enough, sorry.  If\nnecessary, I can resubmit with the additional line?\n\n> Your diff -> test_cmp are certainly something we want to have in any          \n> case. The code changes look ugly, honestly, making the code much less         \n> readable, but it seems to be the only way to make those older platforms       \n> and compilers happy. (Erik pointed out some good ways to reduce the           \n> uglyness somewhat.)                                                           \n\nI think only the const-expr.patch changes are seriously ugly... but\nthen I'm perhaps used to staring at portable code all day.\n\n> I can't test your target platform, but I would test the impact of the         \n> code and test changes on mine. Do you have your series somewhere to pull      \n> from?                                                                         \n\nI'm afraid not, though I can send you (off-list) a zip of the patch\nseries and a quiltrc to apply using quilt or repeated calls to gnu\npotch, or if you prefer, a sumo-patch containing all the changes in\none file for gnu patch?\n\nCheers,\n-- \nGary V. Vaughan (gary@thewrittenword.com)\n"},{"id":"140580","messageId":"20100428095159.GD1394@progeny.tock","threadId":"23619","inReplyTo":"20100428090045.GD36271@thor.il.thewrittenword.com","subject":"Re: [patch 06/16] diff-test_cmp.patch","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-04-28T09:51:59Z","receivedAt":"2010-04-28T09:51:59Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Gary V. Vaughan wrote:\n\n> Can I add a Sign-off message to each patch subthread?  Or do you need\n> me to resubmit the entire series?\n\nI think one sign-off for the whole series would be good enough; then\nthe person applying the patches can forge your signed-off-by lines.\n\nI pointed it out mostly for future patches.\n\n> On Tue, Apr 27, 2010 at 12:15:52PM -0500, Jonathan Nieder wrote:\n\n>> And is it possible to change your mailing script to use more\n>> meaningful subject lines?\n>\n> Sure.  What is preferable?  As short a sentence summarising the fixed\n> issue as I can muster?\n\nYep. :)  It need not be a sentence (and should skip the full stop).\nYou can see some example subject lines by looking at the \"shortlog\"\nfrom git or Linux release announcements or running\ngit log --oneline --no-merges.\n\nSomething like “tests: Use test_cmp when appropriate” would do.\n\n> (Like SuSE Linux, we use quilt to manage and\n> submit our patch stacks... git seems to require hosting the entire\n> history of each project which is too heavyweight for the 1000's of\n> packages we build - if git provides the means to store just the head\n> of an upstream release branch along with our patch stacks on local\n> disk, I would love to be proven wrong here).\n\nThe most general way:\n\n curl http://address/of/tarball.tar.gz | tar -xf - \n git init *\n cd *\n git add .\n git commit -m \"upstream release\"\n ... use git like normal\n\nYou can automate some of those steps by\n\n wget http://address/of/tarball.tar.gz\n git init project\n cd project\n perl /usr/share/doc/git/contrib/fast-import/import-tars.perl tarball.tar.gz\n git checkout import-tars\n ... use git as usual\n\nIf upstream uses git, there is also the shallow-clone facility:\n\n git clone -b master --depth=1 git://repo.or.cz/git.git/\n cd git\n ... use git as usual, except history is cauterized\n\nIt has one rough edge you may run into: push is not supported.  If that\nis a problem for you, let me know and maybe I can try to help fix it.\n\nHonestly, I’m okay with quilt, too.  The main difference I notice is that\n‘git diff’ uses the equivalent of the diff -p (--show-c-function)\noption by default.\n\n> Maybe in combination with the missing Signed-off-by: headers and\n> unsuitable Subject headers I need to amend and resubmit the whole\n> patch series again?\n\nI think the cognitive load on reviewers is lighter if you send small,\nisolated changes until you think it is as ready as it is going to get\nfor the current round, and only then resubmit the series.\n\nThanks for the hard work.\nJonathan\n"},{"id":"140581","messageId":"20100428101255.GA39644@thor.il.thewrittenword.com","threadId":"23619","inReplyTo":"20100427135708.258636000@mlists.thewrittenword.com","subject":"Re: [patch 00/16] Portability Patches for git-1.7.1 (v4)","fromName":"Gary V. Vaughan","fromEmail":"git@mlists.thewrittenword.com","sentAt":"2010-04-28T10:12:55Z","receivedAt":"2010-04-28T10:12:55Z","isPatch":true,"sender":{"key":"git@mlists.thewrittenword.com","avatar":null},"body":"I forgot to provide this for the patch series:\n\nSigned-off-by: Gary V. Vaughan <gary@thewrittenword.com>\n\nCheers,\n-- \nGary V. Vaughan (gary@thewrittenword.com)\n"},{"id":"140582","messageId":"20100428102250.GB39644@thor.il.thewrittenword.com","threadId":"23619","inReplyTo":"20100428095159.GD1394@progeny.tock","subject":"Re: [patch 06/16] diff-test_cmp.patch","fromName":"Gary V. Vaughan","fromEmail":"git@mlists.thewrittenword.com","sentAt":"2010-04-28T10:22:50Z","receivedAt":"2010-04-28T10:22:50Z","isPatch":true,"sender":{"key":"git@mlists.thewrittenword.com","avatar":null},"body":"On Wed, Apr 28, 2010 at 04:51:59AM -0500, Jonathan Nieder wrote:\n> I think one sign-off for the whole series would be good enough; then\n> the person applying the patches can forge your signed-off-by lines.\n\nOkay, done Thanks.\n\n> Gary V. Vaughan wrote:\n> > (Like SuSE Linux, we use quilt to manage and\n> > submit our patch stacks... git seems to require hosting the entire\n> > history of each project which is too heavyweight for the 1000's of\n> > packages we build - if git provides the means to store just the head\n> > of an upstream release branch along with our patch stacks on local\n> > disk, I would love to be proven wrong here).\n> \n> The most general way:\n> \n>  curl http://address/of/tarball.tar.gz | tar -xf - \n>  git init *\n>  cd *\n>  git add .\n>  git commit -m \"upstream release\"\n>  ... use git like normal\n\nD'oh.  Of course... I was too fixated on git clone to notice.\n\n> You can automate some of those steps by\n> \n>  wget http://address/of/tarball.tar.gz\n>  git init project\n>  cd project\n>  perl /usr/share/doc/git/contrib/fast-import/import-tars.perl tarball.tar.gz\n>  git checkout import-tars\n>  ... use git as usual\n\nWhat's happening here?  Is this sharing a single repository for all\nlocally hosted git projects, or is this more or less the same as the\nabove?\n\n> If upstream uses git, there is also the shallow-clone facility:\n> \n>  git clone -b master --depth=1 git://repo.or.cz/git.git/\n>  cd git\n>  ... use git as usual, except history is cauterized\n\nThis is probably the flavour that would be of the most use to us.\nThanks for educating me :)\n\n> It has one rough edge you may run into: push is not supported.  If that\n> is a problem for you, let me know and maybe I can try to help fix it.\n\nNo, I think the main benefit of using git locally would be to provide\na pull source for upstream.\n\n> Honestly, I???m okay with quilt, too.  The main difference I notice is that\n> ???git diff??? uses the equivalent of the diff -p (--show-c-function)\n> option by default.\n\nIn /etc/quilt.quiltrc we have:\n\n# Options passed to GNU diff when generating patches\nQUILT_DIFF_OPTS=\"--show-c-function\"\n\nAnd I've been careful to regenerate a/b patches for submission to this\nlist, so the only difference then is that you can't pull the patches\nfrom me when I use quilt.\n\nCheers,\n-- \nGary V. Vaughan (gary@thewrittenword.com)\n"},{"id":"140585","messageId":"20100428121756.GA17244@sigill.intra.peff.net","threadId":"23619","inReplyTo":"20100428091922.GF36271@thor.il.thewrittenword.com","subject":"Re: [patch 00/16] Portability Patches for git-1.7.1 (v4)","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2010-04-28T12:17:56Z","receivedAt":"2010-04-28T12:17:56Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Apr 28, 2010 at 09:19:22AM +0000, Gary V. Vaughan wrote:\n\n> > > > Furthermore, if we do take such changes, how are we going to manage\n> > > > portability going forward? Some constructs (like non-constant\n> > > > initializers) make the code much easier to read. People _will_ submit\n> > > > patches that use them. Is somebody going to be auto-building on all of\n> > > > these platforms with vendor compilers to confirm that nothing is broken?\n> \n> And that's fine.  People who are trying to build will notice the\n> breakage on their platforms and likely submit patches in due course.\n\nThat was sort of implicit in my questions. _Is_ there somebody who is\ngoing to be building on these platforms that will notice the breakage?\n\nBut it sounds from the rest of your mail like you are willing to do so,\nwhich is at least encouraging.\n\n-Peff\n"},{"id":"140586","messageId":"n2x51dd1af81004280526v2b0bb38ax90b9550a8840da7e@mail.gmail.com","threadId":"23619","inReplyTo":"20100428093205.GH36271@thor.il.thewrittenword.com","subject":"Re: [patch 00/16] Portability Patches for git-1.7.1 (v4)","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-04-28T12:26:37Z","receivedAt":"2010-04-28T12:26:37Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Wed, Apr 28, 2010 at 09:32, Gary V. Vaughan\n<git@mlists.thewrittenword.com> wrote:\n> I'm afraid not, though I can send you (off-list) a zip of the patch\n> series and a quiltrc to apply using quilt or repeated calls to gnu\n> potch, or if you prefer, a sumo-patch containing all the changes in\n> one file for gnu patch?\n\nI know of someone who'd like to test these on HP-UX, but it can be\nhard to extract patches from the list:)\n\nYou can attach your patch series to the list with, e.g.:\n\n    git format-patch --stdout -M origin.. > series.patch\n\nOr maybe put up a forked repository somewhere, like on GitHub.\n"},{"id":"140594","messageId":"20100428162324.GB7527@coredump.intra.peff.net","threadId":"23619","inReplyTo":"4BD7F81A.4030906@spacetec.no","subject":"Re: [patch 04/16] Without this patch at least IBM VisualAge C 5.0 (I have 5.0.2) on AIX 5.1 fails to compile git.","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2010-04-28T16:23:24Z","receivedAt":"2010-04-28T16:23:24Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Apr 28, 2010 at 10:55:54AM +0200, Tor Arntsen wrote:\n\n> >> The patch is against master. Are we supposed to make patches against\n> >> master or maint? (I thought I saw the latter somewhere. I'm pretty\n> >> new in here though..)\n> [...]\n> Ok. That would correspond to master from git anyway. I make my patches\n> against a git checkout, and I was just throwing out the question to\n> the general audience, for my own knowledge.\n\nThe answer is that you should base your patch on whatever is the best\nplace for Junio to apply it. :)\n\nFor new feature work that will go into the next 3-number release (e.g.,\n1.7.1), that should generally just go on 'master'.\n\nFor bugfixes that will be part of stable release (e.g., 1.7.0.7), they\nshould generally go right on top of the commit introducing the bug, and\ncan then be merged into whichever versions exhibit the bug. If it's not\na bugfix but rather a documentation or portability fix that should go to\nmaint, and doesn't necessarily have a specific commit to based on,\nbuilding on 'maint' is probably OK, which would be appropriate for the\nnext stable release. There is some benefit to going farther back if the\nfix should be merged to multiple maint tracks (e.g., both 1.6.6.x and\n1.7.0.x). I'm not sure how Junio decides which maint releases are \"too\nold\" to care about.\n\nIt's almost never a good idea to base work on \"next\" as a whole.  It is\nappropriate to base work on commits on a topic that is _in_ next, but\nonly if you are building on to that topic. Otherwise, we try to keep\ntopics independent (by building them on \"master\") so that they can be\nmerged independently as they mature.\n\nFor this particular patch set, \"master\" is probably a good starting\npoint. Portability fixes can often go to maint as described above, but\nthis particular patchset is more like feature work. It's big and\ninvasive, and it is not about fixing minor portability issues introduced\nby recent commits, but rather is about porting to many brand new\nplatforms.\n\n-Peff\n"},{"id":"140596","messageId":"20100428174302.GD2041@progeny.tock","threadId":"23619","inReplyTo":"20100428102250.GB39644@thor.il.thewrittenword.com","subject":"Re: [patch 06/16] diff-test_cmp.patch","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-04-28T17:43:02Z","receivedAt":"2010-04-28T17:43:02Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Gary V. Vaughan wrote:\n> On Wed, Apr 28, 2010 at 04:51:59AM -0500, Jonathan Nieder wrote:\n\n>> The most general way:\n[git init and git add . and git commit]\n> D'oh.  Of course... I was too fixated on git clone to notice.\n>\n>> You can automate some of those steps by\n>> \n>>  wget http://address/of/tarball.tar.gz\n>>  git init project\n>>  cd project\n>>  perl /usr/share/doc/git/contrib/fast-import/import-tars.perl tarball.tar.gz\n>>  git checkout import-tars\n>>  ... use git as usual\n>\n> What's happening here?  Is this sharing a single repository for all\n> locally hosted git projects, or is this more or less the same as the\n> above?\n\nIt’s the same as the above.  The only advantages I can think of are that\nit might be slightly faster (though I haven’t tested) and that this way\nI don’t have to remember the tar --strip-components option.\n\nYou could share a single repository for all locally hosted git projects,\nbut that would kill the behavior of make.\n\n>> If upstream uses git, there is also the shallow-clone facility:\n>> \n>>  git clone -b master --depth=1 git://repo.or.cz/git.git/\n>>  cd git\n>>  ... use git as usual, except history is cauterized\n>\n> This is probably the flavour that would be of the most use to us.\n> Thanks for educating me :)\n>\n>> It has one rough edge you may run into: push is not supported.  If that\n>> is a problem for you, let me know and maybe I can try to help fix it.\n>\n> No, I think the main benefit of using git locally would be to provide\n> a pull source for upstream.\n\nOh, that’s another rough edge (the same one, fundamentally).  Sorry.\n\nAnother benefit of using git to fetch from upstream is to get the latest\nversion.\n\nHope that helps,\nJonathan\n"},{"id":"140668","messageId":"20100429105044.GB40206@thor.il.thewrittenword.com","threadId":"23619","inReplyTo":"4BD94599.5090309@drmicha.warpmail.net","subject":"Re: [patch 00/16] Portability Patches for git-1.7.1 (v4)","fromName":"Gary V. Vaughan","fromEmail":"git@mlists.thewrittenword.com","sentAt":"2010-04-29T10:50:44Z","receivedAt":"2010-04-29T10:50:44Z","isPatch":true,"sender":{"key":"git@mlists.thewrittenword.com","avatar":null},"body":"Hi Michael,\n\nOn Thu, Apr 29, 2010 at 10:38:49AM +0200, Michael J Gruber wrote:\n> Michael J Gruber venit, vidit, dixit 27.04.2010 17:30:\n> > I can't test your target platform, but I would test the impact of the\n> > code and test changes on mine. Do you have your series somewhere to pull\n> > from?\n> \n> OK, unsurprsingly, tests still pass on Linux (Fedora 12 x86_64).\n> If anyone wants to try, the series can be found at\n> \n> git://repo.or.cz/git/mjg.git\n> \n> in branch\n> \n> gvv/platform-compatibility\n> \n> applied cleanly on current master.\n\nThank you for taking care of that.  Much appreciated.\n\nCheers,\n-- \nGary V. Vaughan (gary@thewrittenword.com)\n"},{"id":"140699","messageId":"4BDC744E.4050006@drmicha.warpmail.net","threadId":"23619","inReplyTo":"4BD7032D.9050508@drmicha.warpmail.net","subject":"Re: [patch 00/16] Portability Patches for git-1.7.1 (v4)","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2010-05-01T18:34:54Z","receivedAt":"2010-05-01T18:34:54Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"[resent after vger recovery]\nMichael J Gruber venit, vidit, dixit 27.04.2010 17:30:\n> Gary V. Vaughan venit, vidit, dixit 27.04.2010 15:57:\n>> Here are the portability patches we needed at TWW to enable git-1.7.1\n>> to compile and run on all of the wide range of Unix machines we\n>> support.  These patches apply to the git-1.7.1 release,  and address\n>> all of the feedback from the previous three times I posted them to\n>> this list, including fixing the massive testsuite failures I was\n>> experiencing and taking into account that the ss_family fixes and\n>> partial GMT_CMP_TEST fixes that have been pushed since my last post of\n>> this patch queue.\n> \n> General remark: None of your patches have a s-o-b line. If you want to\n> have your patches in git you are required to sign-off on them (commit\n> -s) in order to certify that you can submit them under the license terms\n> of the project.\n> \n> Your diff -> test_cmp are certainly something we want to have in any\n> case. The code changes look ugly, honestly, making the code much less\n> readable, but it seems to be the only way to make those older platforms\n> and compilers happy. (Erik pointed out some good ways to reduce the\n> uglyness somewhat.)\n> \n> I can't test your target platform, but I would test the impact of the\n> code and test changes on mine. Do you have your series somewhere to pull\n> from?\n\nOK, unsurprsingly, tests still pass on Linux (Fedora 12 x86_64).\nIf anyone wants to try, the series can be found at\n\ngit://repo.or.cz/git/mjg.git\n\nin branch\n\ngvv/platform-compatibility\n\napplied cleanly on current master.\n\nCheers,\nMichael\n"},{"id":"140716","messageId":"7vk4rn2oiv.fsf@alter.siamese.dyndns.org","threadId":"23619","inReplyTo":"4BDC744E.4050006@drmicha.warpmail.net","subject":"Re: [patch 00/16] Portability Patches for git-1.7.1 (v4)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-05-01T23:25:12Z","receivedAt":"2010-05-01T23:25:12Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Michael J Gruber <git@drmicha.warpmail.net> writes:\n\n> Michael J Gruber venit, vidit, dixit 27.04.2010 17:30:\n>> Gary V. Vaughan venit, vidit, dixit 27.04.2010 15:57:\n>>> Here are the portability patches we needed at TWW to enable git-1.7.1\n>>> to compile and run on all of the wide range of Unix machines we\n>>> support.  These patches apply to the git-1.7.1 release,  and address\n>>> all of the feedback from the previous three times I posted them to\n>>> this list, including fixing the massive testsuite failures I was\n>>> experiencing and taking into account that the ss_family fixes and\n>>> partial GMT_CMP_TEST fixes that have been pushed since my last post of\n>>> this patch queue.\n>> \n>> General remark: None of your patches have a s-o-b line. If you want to\n>> have your patches in git you are required to sign-off on them (commit\n>> -s) in order to certify that you can submit them under the license terms\n>> of the project.\n>> \n>> Your diff -> test_cmp are certainly something we want to have in any\n>> case. The code changes look ugly, honestly, making the code much less\n>> readable, but it seems to be the only way to make those older platforms\n>> and compilers happy. (Erik pointed out some good ways to reduce the\n>> uglyness somewhat.)\n>> \n>> I can't test your target platform, but I would test the impact of the\n>> code and test changes on mine. Do you have your series somewhere to pull\n>> from?\n>\n> OK, unsurprsingly, tests still pass on Linux (Fedora 12 x86_64).\n> If anyone wants to try, the series can be found at\n>\n> git://repo.or.cz/git/mjg.git\n>\n> in branch\n>\n> gvv/platform-compatibility\n>\n> applied cleanly on current master.\n\nThanks.  \n\nLike everybody else, I like the s/diff/test_cmp/ one in general.  On\nplatforms without \"diff -u\", test_cmp may want to use \"diff -c\" instead\nfor readability, but that can be fixed/enhanced independently.\n\nI agree with your general remark and also noticed that the titles are way\nsuboptimal.\n\n* user-cppflags.patch\n\n  Makefile: pass CPPFLAGS through to fllow customization\n\n* const-expr.patch\n\n  Rewrite dynamic structure initializations to runtime assignment\n\n* pthread.patch\n\n  Makefile: -lpthread may still be necessary when libc has only pthread stubs\n\n* Without this patch at least IBM VisualAge C 5.0 (I have 5.0.2) on AIX 5.1 fails to compile git.\n\n  enums: omit trailing comma for portability\n\n* diff-export.patch\n\n  Do not use \"diff\" found on PATH while building and installing\n\nI think the change to git-merge-one-file.sh in this patch is wrong, by the\nway.\n\n* diff-test_cmp.patch\n\n  tests: use \"test_cmp\", not \"diff\", when verifying the result\n\nThe patch to t9400 has indent-with-spaces, by the way.\n\n* diff-defaults.patch\n\n  test_cmp: do not use \"diff -u\" on platforms that lack one\n\nIt may be better to use \"diff -c\" on most of them, though.\n\n* host-SunOS56.patch\n\n  Makefile: SunOS 5.6 portability fix\n\n* host-IRIX.patch\n\n  git-compat-util.h: Irix 6.5 defines 'sgi' but not '__sgi'.\n\n* host-HPUX10.patch\n\nThis would be better as two patches\n\n  Makefile: HP-UX 10.20 lacks pread()\n  git-compat-util.h: some platforms with mmap() lack MAP_FAILED definition\n\n* host-HPUX11.patch\n\n  Makefile: HPUX does not have nanosecond timestamp in struct stat\n\n* host-OSF1.patch\n\n  Makefile: Tru64 portability fix\n\n* no-hstrerror.patch\n\nI think this should come before \"Makefile: SunOS 5.6 portability fix\"\n(split the change to Makefile from this one and move it to the other\npatch).  Then this patch does not talk about SunOS specific issues.\n\n  Makefile: some platforms do not have hstrerror anywhere\n\n* no-inet_ntop.patch\n\nIt might make sense to squash this patch into the previous one (and again\ndo this before HPUX patches to Makefile) that deals with three functions\nthat are traditionally related to libresolv (hstrerror, inet_ntop/pton).\n\n  Make NO_{HSTRERROR,INET_NTOP,INET_PTON} configured independently\n\n* no-socklen_t.patch\n\nDo this before the platform dependent bits, i.e. move the hunks that\nchanges \"ifeq ($(uname_S,XXX)\" block from this patch to host-XXX patch,\nand do the remainder of this patch before any of the platform ones.\n\n  Some platforms lack socklen_t type\n\n* no-inline.patch\n\nDo this before ... (ditto) ...\n\n  Allow disabling \"inline\"\n"},{"id":"140764","messageId":"s2gc4c738cd1005020600s1c440fc7gec38823196cc1e5b@mail.gmail.com","threadId":"23619","inReplyTo":"4BDC744E.4050006@drmicha.warpmail.net","subject":"Re: [patch 00/16] Portability Patches for git-1.7.1 (v4)","fromName":"Øyvind A. Holm","fromEmail":"sunny@sunbase.org","sentAt":"2010-05-02T13:00:40Z","receivedAt":"2010-05-02T13:00:40Z","isPatch":true,"sender":{"key":"sunny@sunbase.org","avatar":"https://avatars.githubusercontent.com/u/113445?v=4"},"body":"On 1 May 2010 20:34, Michael J Gruber <git@drmicha.warpmail.net> wrote:\n> Gary V. Vaughan venit, vidit, dixit 27.04.2010 15:57:\n> > Here are the portability patches we needed at TWW to enable git-1.7.1 to\n> > compile and run on all of the wide range of Unix machines we support.\n>\n> OK, unsurprsingly, tests still pass on Linux (Fedora 12 x86_64).\n> If anyone wants to try, the series can be found at\n>\n> git://repo.or.cz/git/mjg.git\n>\n> in branch\n>\n> gvv/platform-compatibility\n\nThe patches compiles fine and runs the test suite without errors on Ubuntu 9.10\n(x86_64). Tested original branch (v1.7.1-16-ga32be36, branched on v1.7.1) and\nrebase on current master (ddb27a5a)\n\nCheers,\nØyvind A. Holm\n"},{"id":"140804","messageId":"20100503013946.GB1550@thor.il.thewrittenword.com","threadId":"23619","inReplyTo":"1AFA5FB2-EB8B-4775-8941-86428C7F740E@gmail.com","subject":"Re: [patch 02/16] const-expr.patch","fromName":"Gary V. Vaughan","fromEmail":"git@mlists.thewrittenword.com","sentAt":"2010-05-03T01:39:46Z","receivedAt":"2010-05-03T01:39:46Z","isPatch":true,"sender":{"key":"git@mlists.thewrittenword.com","avatar":null},"body":"Hi Joshua,\n\nOn Sat, May 01, 2010 at 03:21:24AM -0700, Joshua Juran wrote:\n> On Apr 27, 2010, at 6:57 AM, Gary V. Vaughan wrote:\n> \n> > Index: b/remote.c\n> > ===================================================================\n> > --- a/remote.c\n> > +++ b/remote.c\n> > @@ -657,10 +657,9 @@ static struct refspec *parse_refspec_int\n> >\n> >  int valid_fetch_refspec(const char *fetch_refspec_str)\n> >  {\n> > -\tconst char *fetch_refspec[] = { fetch_refspec_str };\n> >  \tstruct refspec *refspec;\n> >\n> > -\trefspec = parse_refspec_internal(1, fetch_refspec, 1, 1);\n> > +\trefspec = parse_refspec_internal(1, &fetch_refspec_str, 1, 1);\n> >  \tfree_refspecs(refspec, 1);\n> >  \treturn !!refspec;\n> >  }\n> \n> I'm the author of this patch.\n\nI don't follow this list, and made this patch independently without\nreference to yours.\n\nHowever, attribution doesn't concern me, and I don't mean to tread on\ntoes... so feel free to reassign attribution on push.\n\n> Signed-off-by: Joshua Juran <jjuran@gmail.com>\n\nCheers,\n-- \nGary V. Vaughan (gary@thewrittenword.com)\n"},{"id":"140805","messageId":"20100503014834.GC1550@thor.il.thewrittenword.com","threadId":"23619","inReplyTo":"7vk4rn2oiv.fsf@alter.siamese.dyndns.org","subject":"Re: [patch 00/16] Portability Patches for git-1.7.1 (v4)","fromName":"Gary V. Vaughan","fromEmail":"git@mlists.thewrittenword.com","sentAt":"2010-05-03T01:48:34Z","receivedAt":"2010-05-03T01:48:34Z","isPatch":true,"sender":{"key":"git@mlists.thewrittenword.com","avatar":null},"body":"Hi Michael,\n\nThanks for putting up a public repo of those patches; much\nappreciated.\n\nOn Sat, May 01, 2010 at 04:25:12PM -0700, Junio C Hamano wrote:\n> Michael J Gruber <git@drmicha.warpmail.net> writes:\n> > Gary V. Vaughan venit, vidit, dixit 27.04.2010 15:57:\n> > > Here are the portability patches we needed at TWW to enable git-1.7.1\n> > > to compile and run on all of the wide range of Unix machines we\n> > > support. [[...]]\n> >\n> > OK, unsurprsingly, tests still pass on Linux (Fedora 12 x86_64).\n> > If anyone wants to try, the series can be found at\n> >\n> > git://repo.or.cz/git/mjg.git\n> >\n> > in branch\n> >\n> > gvv/platform-compatibility\n> >\n> > applied cleanly on current master.\n> \n> Thanks.  \n\nHi Junio,\n\n> Like everybody else, I like the s/diff/test_cmp/ one in general.  On\n> platforms without \"diff -u\", test_cmp may want to use \"diff -c\" instead\n> for readability, but that can be fixed/enhanced independently.\n> \n> I agree with your general remark and also noticed that the titles are way\n> suboptimal.\n\nI think this is my first patch series submission to the git list, but\nin any case I just used used the patch file-names as is my habit for\nlocally maintained patchsets.\n\nThanks for suggesting better title, which I've already adopted into my\nlocal tree.  If upstream integration stalls, or if it will help smooth\nintegration, I'll make the merging and reordering adjustments you\nrequest and resubmit the whole queue.\n\nCheers,\n-- \nGary V. Vaughan (gary@thewrittenword.com)\n"},{"id":"140883","messageId":"20100504050155.GA7374@thor.il.thewrittenword.com","threadId":"23619","inReplyTo":"A4E8B513-AD31-4F3B-9DEF-6A85AA8DC7B3@gmail.com","subject":"Re: [patch 02/16] const-expr.patch","fromName":"Gary V. Vaughan","fromEmail":"git@mlists.thewrittenword.com","sentAt":"2010-05-04T05:01:55Z","receivedAt":"2010-05-04T05:01:55Z","isPatch":true,"sender":{"key":"git@mlists.thewrittenword.com","avatar":null},"body":"Hi Josh,\n\nOn Sun, May 02, 2010 at 10:57:40PM -0700, Joshua Juran wrote:\n> On May 2, 2010, at 6:39 PM, Gary V. Vaughan wrote:\n> \n> > On Sat, May 01, 2010 at 03:21:24AM -0700, Joshua Juran wrote:\n> >> On Apr 27, 2010, at 6:57 AM, Gary V. Vaughan wrote:\n> >>\n> >>> Index: b/remote.c\n> >>> ===================================================================\n> >>> --- a/remote.c\n> >>> +++ b/remote.c\n> >>> @@ -657,10 +657,9 @@ static struct refspec *parse_refspec_int\n> >>>\n> >>>  int valid_fetch_refspec(const char *fetch_refspec_str)\n> >>>  {\n> >>> -\tconst char *fetch_refspec[] = { fetch_refspec_str };\n> >>>  \tstruct refspec *refspec;\n> >>>\n> >>> -\trefspec = parse_refspec_internal(1, fetch_refspec, 1, 1);\n> >>> +\trefspec = parse_refspec_internal(1, &fetch_refspec_str, 1, 1);\n> >>>  \tfree_refspecs(refspec, 1);\n> >>>  \treturn !!refspec;\n> >>>  }\n> >>\n> >> I'm the author of this patch.\n\nAgreed.\n\n> > I don't follow this list, and made this patch independently without\n> > reference to yours.\n> \n> You sent a different patch to the list, to which I responded[1] (both  \n> to the list and to you directly) with one identical to the one shown  \n> above, after which your subsequent patches included a change equal to  \n> the one I suggested.  If in fact you came up with it independently,  \n> that's fine.  I was just under the impression that you had adopted my  \n> change.\n\nApologies, yes you're quite right.  Either my age, or the vast sea of\npatches for all the projects I'm porting at the moment somehow erased\nthat important exchange from my memory. I hope I didn't cause offence,\nnone was intended.\n\nCheers,\n-- \nGary V. Vaughan (gary@thewrittenword.com)\n"}]}