{"thread":{"id":"25743","subject":"[PATCH 1/4] Makefile: move \"Platform specific tweaks\" above LIB_{H,OBJS}","startedAt":"2010-11-14T14:44:13Z","lastAt":"2010-11-17T20:15:09Z","messageCount":25,"participants":["Ævar Arnfjörð Bjarmason","Sverre Rabbelier","Jonathan Nieder","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":4},"messages":[{"id":"155847","messageId":"1289745857-16704-1-git-send-email-avarab@gmail.com","threadId":"25743","inReplyTo":null,"subject":"[PATCH 0/4] [PULL] ab/i18n-prereqs, prerequisites for ab/i18n","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-11-14T14:44:13Z","receivedAt":"2010-11-14T14:44:13Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"These are the first four patches in the ab/i18n series which aren't\nstrictly related to it, but merely fixes to issues I encountered.\n\nI'm submitting these separately now in the hope that they'll make it\nto the next & master branches before ab/i18n. Having these separately\nreviewed should be easier for everyone.\n\nThese patches can also be fetched from:\n\n    git://github.com/avar/git.git ab/i18n-prereqs\n\nÆvar Arnfjörð Bjarmason (4):\n  Makefile: move \"Platform specific tweaks\" above LIB_{H,OBJS}\n  t7004-tag.sh: re-arrange git tag comment for clarity\n  tests: use test_cmp instead of piping to diff(1)\n  builtin: use builtin.h for all builtin commands\n\n Makefile                         |  687 +++++++++++++++++++-------------------\n builtin/clone.c                  |    3 +-\n builtin/fetch-pack.c             |    2 +-\n builtin/hash-object.c            |    2 +-\n builtin/index-pack.c             |    2 +-\n builtin/merge-index.c            |    2 +-\n builtin/merge-recursive.c        |    2 +-\n builtin/merge-tree.c             |    2 +-\n builtin/mktag.c                  |    2 +-\n builtin/pack-redundant.c         |    2 +-\n builtin/pack-refs.c              |    2 +-\n builtin/patch-id.c               |    2 +-\n builtin/receive-pack.c           |    2 +-\n builtin/remote.c                 |    3 +-\n builtin/reset.c                  |    2 +-\n builtin/send-pack.c              |    2 +-\n builtin/unpack-file.c            |    2 +-\n builtin/var.c                    |    2 +-\n t/t4041-diff-submodule-option.sh |   96 ++++--\n t/t7004-tag.sh                   |   20 +-\n t/t7401-submodule-summary.sh     |   47 ++-\n wt-status.c                      |    2 +-\n 22 files changed, 472 insertions(+), 416 deletions(-)\n\n-- \n1.7.2.3\n"},{"id":"155846","messageId":"1289745857-16704-2-git-send-email-avarab@gmail.com","threadId":"25743","inReplyTo":"1289745857-16704-1-git-send-email-avarab@gmail.com","subject":"[PATCH 1/4] Makefile: move \"Platform specific tweaks\" above LIB_{H,OBJS}","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-11-14T14:44:14Z","receivedAt":"2010-11-14T14:44:14Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Change the Makefile so that the \"Platform specific tweaks\" section\ncomes before the assignments to LIB_H and LIB_OBJS.\n\nIn the ab/i18n series I only want to build gettext.o (by adding it to\nLIB_OBJS) if NO_GETTEXT is unset. It's not possible to do that without\nan ugly hack if we haven't applied our platform specific tweaks before\nLIB_{H,OBJS} gets assigned to.\n\nSee <201008140002.40587.j6t@kdbg.org> (subject: \"[PATCH] Do not build\ni18n on Windows.\") for Johannes's original report, and my follow-up in\n<AANLkTiku5R+idX-C8f0AcCikBLmfEb5ZEhdft+CSRzU0@mail.gmail.com> where I\nsuggested that the problem be solved in the manner of this patch.\n\nReported-by: Johannes Sixt <j6t@kdbg.org>\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n Makefile |  687 +++++++++++++++++++++++++++++++-------------------------------\n 1 files changed, 344 insertions(+), 343 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 1f1ce04..b1f5d8c 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -483,278 +483,6 @@ LIB_FILE=libgit.a\n XDIFF_LIB=xdiff/lib.a\n VCSSVN_LIB=vcs-svn/lib.a\n \n-LIB_H += advice.h\n-LIB_H += archive.h\n-LIB_H += attr.h\n-LIB_H += blob.h\n-LIB_H += builtin.h\n-LIB_H += cache.h\n-LIB_H += cache-tree.h\n-LIB_H += color.h\n-LIB_H += commit.h\n-LIB_H += compat/bswap.h\n-LIB_H += compat/cygwin.h\n-LIB_H += compat/mingw.h\n-LIB_H += compat/win32/pthread.h\n-LIB_H += csum-file.h\n-LIB_H += decorate.h\n-LIB_H += delta.h\n-LIB_H += diffcore.h\n-LIB_H += diff.h\n-LIB_H += dir.h\n-LIB_H += exec_cmd.h\n-LIB_H += fsck.h\n-LIB_H += git-compat-util.h\n-LIB_H += graph.h\n-LIB_H += grep.h\n-LIB_H += hash.h\n-LIB_H += help.h\n-LIB_H += levenshtein.h\n-LIB_H += list-objects.h\n-LIB_H += ll-merge.h\n-LIB_H += log-tree.h\n-LIB_H += mailmap.h\n-LIB_H += merge-recursive.h\n-LIB_H += notes.h\n-LIB_H += notes-cache.h\n-LIB_H += object.h\n-LIB_H += pack.h\n-LIB_H += pack-refs.h\n-LIB_H += pack-revindex.h\n-LIB_H += parse-options.h\n-LIB_H += patch-ids.h\n-LIB_H += pkt-line.h\n-LIB_H += progress.h\n-LIB_H += quote.h\n-LIB_H += reflog-walk.h\n-LIB_H += refs.h\n-LIB_H += remote.h\n-LIB_H += rerere.h\n-LIB_H += resolve-undo.h\n-LIB_H += revision.h\n-LIB_H += run-command.h\n-LIB_H += sha1-lookup.h\n-LIB_H += sideband.h\n-LIB_H += sigchain.h\n-LIB_H += strbuf.h\n-LIB_H += string-list.h\n-LIB_H += submodule.h\n-LIB_H += tag.h\n-LIB_H += transport.h\n-LIB_H += tree.h\n-LIB_H += tree-walk.h\n-LIB_H += unpack-trees.h\n-LIB_H += userdiff.h\n-LIB_H += utf8.h\n-LIB_H += xdiff-interface.h\n-LIB_H += xdiff/xdiff.h\n-\n-LIB_OBJS += abspath.o\n-LIB_OBJS += advice.o\n-LIB_OBJS += alias.o\n-LIB_OBJS += alloc.o\n-LIB_OBJS += archive.o\n-LIB_OBJS += archive-tar.o\n-LIB_OBJS += archive-zip.o\n-LIB_OBJS += attr.o\n-LIB_OBJS += base85.o\n-LIB_OBJS += bisect.o\n-LIB_OBJS += blob.o\n-LIB_OBJS += branch.o\n-LIB_OBJS += bundle.o\n-LIB_OBJS += cache-tree.o\n-LIB_OBJS += color.o\n-LIB_OBJS += combine-diff.o\n-LIB_OBJS += commit.o\n-LIB_OBJS += config.o\n-LIB_OBJS += connect.o\n-LIB_OBJS += convert.o\n-LIB_OBJS += copy.o\n-LIB_OBJS += csum-file.o\n-LIB_OBJS += ctype.o\n-LIB_OBJS += date.o\n-LIB_OBJS += decorate.o\n-LIB_OBJS += diffcore-break.o\n-LIB_OBJS += diffcore-delta.o\n-LIB_OBJS += diffcore-order.o\n-LIB_OBJS += diffcore-pickaxe.o\n-LIB_OBJS += diffcore-rename.o\n-LIB_OBJS += diff-delta.o\n-LIB_OBJS += diff-lib.o\n-LIB_OBJS += diff-no-index.o\n-LIB_OBJS += diff.o\n-LIB_OBJS += dir.o\n-LIB_OBJS += editor.o\n-LIB_OBJS += entry.o\n-LIB_OBJS += environment.o\n-LIB_OBJS += exec_cmd.o\n-LIB_OBJS += fsck.o\n-LIB_OBJS += graph.o\n-LIB_OBJS += grep.o\n-LIB_OBJS += hash.o\n-LIB_OBJS += help.o\n-LIB_OBJS += hex.o\n-LIB_OBJS += ident.o\n-LIB_OBJS += levenshtein.o\n-LIB_OBJS += list-objects.o\n-LIB_OBJS += ll-merge.o\n-LIB_OBJS += lockfile.o\n-LIB_OBJS += log-tree.o\n-LIB_OBJS += mailmap.o\n-LIB_OBJS += match-trees.o\n-LIB_OBJS += merge-file.o\n-LIB_OBJS += merge-recursive.o\n-LIB_OBJS += name-hash.o\n-LIB_OBJS += notes.o\n-LIB_OBJS += notes-cache.o\n-LIB_OBJS += object.o\n-LIB_OBJS += pack-check.o\n-LIB_OBJS += pack-refs.o\n-LIB_OBJS += pack-revindex.o\n-LIB_OBJS += pack-write.o\n-LIB_OBJS += pager.o\n-LIB_OBJS += parse-options.o\n-LIB_OBJS += patch-delta.o\n-LIB_OBJS += patch-ids.o\n-LIB_OBJS += path.o\n-LIB_OBJS += pkt-line.o\n-LIB_OBJS += preload-index.o\n-LIB_OBJS += pretty.o\n-LIB_OBJS += progress.o\n-LIB_OBJS += quote.o\n-LIB_OBJS += reachable.o\n-LIB_OBJS += read-cache.o\n-LIB_OBJS += reflog-walk.o\n-LIB_OBJS += refs.o\n-LIB_OBJS += remote.o\n-LIB_OBJS += replace_object.o\n-LIB_OBJS += rerere.o\n-LIB_OBJS += resolve-undo.o\n-LIB_OBJS += revision.o\n-LIB_OBJS += run-command.o\n-LIB_OBJS += server-info.o\n-LIB_OBJS += setup.o\n-LIB_OBJS += sha1-lookup.o\n-LIB_OBJS += sha1_file.o\n-LIB_OBJS += sha1_name.o\n-LIB_OBJS += shallow.o\n-LIB_OBJS += sideband.o\n-LIB_OBJS += sigchain.o\n-LIB_OBJS += strbuf.o\n-LIB_OBJS += string-list.o\n-LIB_OBJS += submodule.o\n-LIB_OBJS += symlinks.o\n-LIB_OBJS += tag.o\n-LIB_OBJS += trace.o\n-LIB_OBJS += transport.o\n-LIB_OBJS += transport-helper.o\n-LIB_OBJS += tree-diff.o\n-LIB_OBJS += tree.o\n-LIB_OBJS += tree-walk.o\n-LIB_OBJS += unpack-trees.o\n-LIB_OBJS += url.o\n-LIB_OBJS += usage.o\n-LIB_OBJS += userdiff.o\n-LIB_OBJS += utf8.o\n-LIB_OBJS += walker.o\n-LIB_OBJS += wrapper.o\n-LIB_OBJS += write_or_die.o\n-LIB_OBJS += ws.o\n-LIB_OBJS += wt-status.o\n-LIB_OBJS += xdiff-interface.o\n-\n-BUILTIN_OBJS += builtin/add.o\n-BUILTIN_OBJS += builtin/annotate.o\n-BUILTIN_OBJS += builtin/apply.o\n-BUILTIN_OBJS += builtin/archive.o\n-BUILTIN_OBJS += builtin/bisect--helper.o\n-BUILTIN_OBJS += builtin/blame.o\n-BUILTIN_OBJS += builtin/branch.o\n-BUILTIN_OBJS += builtin/bundle.o\n-BUILTIN_OBJS += builtin/cat-file.o\n-BUILTIN_OBJS += builtin/check-attr.o\n-BUILTIN_OBJS += builtin/check-ref-format.o\n-BUILTIN_OBJS += builtin/checkout-index.o\n-BUILTIN_OBJS += builtin/checkout.o\n-BUILTIN_OBJS += builtin/clean.o\n-BUILTIN_OBJS += builtin/clone.o\n-BUILTIN_OBJS += builtin/commit-tree.o\n-BUILTIN_OBJS += builtin/commit.o\n-BUILTIN_OBJS += builtin/config.o\n-BUILTIN_OBJS += builtin/count-objects.o\n-BUILTIN_OBJS += builtin/describe.o\n-BUILTIN_OBJS += builtin/diff-files.o\n-BUILTIN_OBJS += builtin/diff-index.o\n-BUILTIN_OBJS += builtin/diff-tree.o\n-BUILTIN_OBJS += builtin/diff.o\n-BUILTIN_OBJS += builtin/fast-export.o\n-BUILTIN_OBJS += builtin/fetch-pack.o\n-BUILTIN_OBJS += builtin/fetch.o\n-BUILTIN_OBJS += builtin/fmt-merge-msg.o\n-BUILTIN_OBJS += builtin/for-each-ref.o\n-BUILTIN_OBJS += builtin/fsck.o\n-BUILTIN_OBJS += builtin/gc.o\n-BUILTIN_OBJS += builtin/grep.o\n-BUILTIN_OBJS += builtin/hash-object.o\n-BUILTIN_OBJS += builtin/help.o\n-BUILTIN_OBJS += builtin/index-pack.o\n-BUILTIN_OBJS += builtin/init-db.o\n-BUILTIN_OBJS += builtin/log.o\n-BUILTIN_OBJS += builtin/ls-files.o\n-BUILTIN_OBJS += builtin/ls-remote.o\n-BUILTIN_OBJS += builtin/ls-tree.o\n-BUILTIN_OBJS += builtin/mailinfo.o\n-BUILTIN_OBJS += builtin/mailsplit.o\n-BUILTIN_OBJS += builtin/merge.o\n-BUILTIN_OBJS += builtin/merge-base.o\n-BUILTIN_OBJS += builtin/merge-file.o\n-BUILTIN_OBJS += builtin/merge-index.o\n-BUILTIN_OBJS += builtin/merge-ours.o\n-BUILTIN_OBJS += builtin/merge-recursive.o\n-BUILTIN_OBJS += builtin/merge-tree.o\n-BUILTIN_OBJS += builtin/mktag.o\n-BUILTIN_OBJS += builtin/mktree.o\n-BUILTIN_OBJS += builtin/mv.o\n-BUILTIN_OBJS += builtin/name-rev.o\n-BUILTIN_OBJS += builtin/notes.o\n-BUILTIN_OBJS += builtin/pack-objects.o\n-BUILTIN_OBJS += builtin/pack-redundant.o\n-BUILTIN_OBJS += builtin/pack-refs.o\n-BUILTIN_OBJS += builtin/patch-id.o\n-BUILTIN_OBJS += builtin/prune-packed.o\n-BUILTIN_OBJS += builtin/prune.o\n-BUILTIN_OBJS += builtin/push.o\n-BUILTIN_OBJS += builtin/read-tree.o\n-BUILTIN_OBJS += builtin/receive-pack.o\n-BUILTIN_OBJS += builtin/reflog.o\n-BUILTIN_OBJS += builtin/remote.o\n-BUILTIN_OBJS += builtin/replace.o\n-BUILTIN_OBJS += builtin/rerere.o\n-BUILTIN_OBJS += builtin/reset.o\n-BUILTIN_OBJS += builtin/rev-list.o\n-BUILTIN_OBJS += builtin/rev-parse.o\n-BUILTIN_OBJS += builtin/revert.o\n-BUILTIN_OBJS += builtin/rm.o\n-BUILTIN_OBJS += builtin/send-pack.o\n-BUILTIN_OBJS += builtin/shortlog.o\n-BUILTIN_OBJS += builtin/show-branch.o\n-BUILTIN_OBJS += builtin/show-ref.o\n-BUILTIN_OBJS += builtin/stripspace.o\n-BUILTIN_OBJS += builtin/symbolic-ref.o\n-BUILTIN_OBJS += builtin/tag.o\n-BUILTIN_OBJS += builtin/tar-tree.o\n-BUILTIN_OBJS += builtin/unpack-file.o\n-BUILTIN_OBJS += builtin/unpack-objects.o\n-BUILTIN_OBJS += builtin/update-index.o\n-BUILTIN_OBJS += builtin/update-ref.o\n-BUILTIN_OBJS += builtin/update-server-info.o\n-BUILTIN_OBJS += builtin/upload-archive.o\n-BUILTIN_OBJS += builtin/var.o\n-BUILTIN_OBJS += builtin/verify-pack.o\n-BUILTIN_OBJS += builtin/verify-tag.o\n-BUILTIN_OBJS += builtin/write-tree.o\n-\n-GITLIBS = $(LIB_FILE) $(XDIFF_LIB)\n EXTLIBS =\n \n #\n@@ -1077,78 +805,351 @@ ifeq ($(uname_S),Windows)\n \tBLK_SHA1 = YesPlease\n \tNATIVE_CRLF = YesPlease\n \n-\tCC = compat/vcbuild/scripts/clink.pl\n-\tAR = compat/vcbuild/scripts/lib.pl\n-\tCFLAGS =\n-\tBASIC_CFLAGS = -nologo -I. -I../zlib -Icompat/vcbuild -Icompat/vcbuild/include -DWIN32 -D_CONSOLE -DHAVE_STRING_H -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE\n-\tCOMPAT_OBJS = compat/msvc.o compat/fnmatch/fnmatch.o compat/winansi.o compat/win32/pthread.o\n-\tCOMPAT_CFLAGS = -D__USE_MINGW_ACCESS -DNOGDI -DHAVE_STRING_H -DHAVE_ALLOCA_H -Icompat -Icompat/fnmatch -Icompat/regex -Icompat/fnmatch -Icompat/win32 -DSTRIP_EXTENSION=\\\".exe\\\"\n-\tBASIC_LDFLAGS = -IGNORE:4217 -IGNORE:4049 -NOLOGO -SUBSYSTEM:CONSOLE -NODEFAULTLIB:MSVCRT.lib\n-\tEXTLIBS = advapi32.lib shell32.lib wininet.lib ws2_32.lib\n-\tPTHREAD_LIBS =\n-\tlib =\n-ifndef DEBUG\n-\tBASIC_CFLAGS += -GL -Os -MT\n-\tBASIC_LDFLAGS += -LTCG\n-\tAR += -LTCG\n-else\n-\tBASIC_CFLAGS += -Zi -MTd\n-endif\n-\tX = .exe\n-endif\n-ifneq (,$(findstring MINGW,$(uname_S)))\n-\tpathsep = ;\n-\tNO_PREAD = YesPlease\n-\tNEEDS_CRYPTO_WITH_SSL = YesPlease\n-\tNO_LIBGEN_H = YesPlease\n-\tNO_SYMLINK_HEAD = YesPlease\n-\tNO_SETENV = YesPlease\n-\tNO_UNSETENV = YesPlease\n-\tNO_STRCASESTR = YesPlease\n-\tNO_STRLCPY = YesPlease\n-\tNO_STRTOK_R = YesPlease\n-\tNO_MEMMEM = YesPlease\n-\tNEEDS_LIBICONV = YesPlease\n-\tOLD_ICONV = YesPlease\n-\tNO_C99_FORMAT = YesPlease\n-\tNO_STRTOUMAX = YesPlease\n-\tNO_MKDTEMP = YesPlease\n-\tNO_MKSTEMPS = YesPlease\n-\tNO_SVN_TESTS = YesPlease\n-\tNO_PERL_MAKEMAKER = YesPlease\n-\tRUNTIME_PREFIX = YesPlease\n-\tNO_POSIX_ONLY_PROGRAMS = YesPlease\n-\tNO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease\n-\tNO_NSEC = YesPlease\n-\tUSE_WIN32_MMAP = YesPlease\n-\tUSE_NED_ALLOCATOR = YesPlease\n-\tUNRELIABLE_FSTAT = UnfortunatelyYes\n-\tOBJECT_CREATION_USES_RENAMES = UnfortunatelyNeedsTo\n-\tNO_REGEX = YesPlease\n-\tNO_PYTHON = YesPlease\n-\tBLK_SHA1 = YesPlease\n-\tETAGS_TARGET = ETAGS\n-\tCOMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat -Icompat/fnmatch -Icompat/win32\n-\tCOMPAT_CFLAGS += -DSTRIP_EXTENSION=\\\".exe\\\"\n-\tCOMPAT_OBJS += compat/mingw.o compat/fnmatch/fnmatch.o compat/winansi.o \\\n-\t\tcompat/win32/pthread.o\n-\tEXTLIBS += -lws2_32\n-\tPTHREAD_LIBS =\n-\tX = .exe\n-ifneq (,$(wildcard ../THIS_IS_MSYSGIT))\n-\thtmldir=doc/git/html/\n-\tprefix =\n-\tINSTALL = /bin/install\n-\tEXTLIBS += /mingw/lib/libz.a\n-\tNO_R_TO_GCC_LINKER = YesPlease\n-\tINTERNAL_QSORT = YesPlease\n-else\n-\tNO_CURL = YesPlease\n-endif\n-endif\n+\tCC = compat/vcbuild/scripts/clink.pl\n+\tAR = compat/vcbuild/scripts/lib.pl\n+\tCFLAGS =\n+\tBASIC_CFLAGS = -nologo -I. -I../zlib -Icompat/vcbuild -Icompat/vcbuild/include -DWIN32 -D_CONSOLE -DHAVE_STRING_H -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE\n+\tCOMPAT_OBJS = compat/msvc.o compat/fnmatch/fnmatch.o compat/winansi.o compat/win32/pthread.o\n+\tCOMPAT_CFLAGS = -D__USE_MINGW_ACCESS -DNOGDI -DHAVE_STRING_H -DHAVE_ALLOCA_H -Icompat -Icompat/fnmatch -Icompat/regex -Icompat/fnmatch -Icompat/win32 -DSTRIP_EXTENSION=\\\".exe\\\"\n+\tBASIC_LDFLAGS = -IGNORE:4217 -IGNORE:4049 -NOLOGO -SUBSYSTEM:CONSOLE -NODEFAULTLIB:MSVCRT.lib\n+\tEXTLIBS = advapi32.lib shell32.lib wininet.lib ws2_32.lib\n+\tPTHREAD_LIBS =\n+\tlib =\n+ifndef DEBUG\n+\tBASIC_CFLAGS += -GL -Os -MT\n+\tBASIC_LDFLAGS += -LTCG\n+\tAR += -LTCG\n+else\n+\tBASIC_CFLAGS += -Zi -MTd\n+endif\n+\tX = .exe\n+endif\n+ifneq (,$(findstring MINGW,$(uname_S)))\n+\tpathsep = ;\n+\tNO_PREAD = YesPlease\n+\tNEEDS_CRYPTO_WITH_SSL = YesPlease\n+\tNO_LIBGEN_H = YesPlease\n+\tNO_SYMLINK_HEAD = YesPlease\n+\tNO_SETENV = YesPlease\n+\tNO_UNSETENV = YesPlease\n+\tNO_STRCASESTR = YesPlease\n+\tNO_STRLCPY = YesPlease\n+\tNO_STRTOK_R = YesPlease\n+\tNO_MEMMEM = YesPlease\n+\tNEEDS_LIBICONV = YesPlease\n+\tOLD_ICONV = YesPlease\n+\tNO_C99_FORMAT = YesPlease\n+\tNO_STRTOUMAX = YesPlease\n+\tNO_MKDTEMP = YesPlease\n+\tNO_MKSTEMPS = YesPlease\n+\tNO_SVN_TESTS = YesPlease\n+\tNO_PERL_MAKEMAKER = YesPlease\n+\tRUNTIME_PREFIX = YesPlease\n+\tNO_POSIX_ONLY_PROGRAMS = YesPlease\n+\tNO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease\n+\tNO_NSEC = YesPlease\n+\tUSE_WIN32_MMAP = YesPlease\n+\tUSE_NED_ALLOCATOR = YesPlease\n+\tUNRELIABLE_FSTAT = UnfortunatelyYes\n+\tOBJECT_CREATION_USES_RENAMES = UnfortunatelyNeedsTo\n+\tNO_REGEX = YesPlease\n+\tNO_PYTHON = YesPlease\n+\tBLK_SHA1 = YesPlease\n+\tETAGS_TARGET = ETAGS\n+\tCOMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat -Icompat/fnmatch -Icompat/win32\n+\tCOMPAT_CFLAGS += -DSTRIP_EXTENSION=\\\".exe\\\"\n+\tCOMPAT_OBJS += compat/mingw.o compat/fnmatch/fnmatch.o compat/winansi.o \\\n+\t\tcompat/win32/pthread.o\n+\tEXTLIBS += -lws2_32\n+\tPTHREAD_LIBS =\n+\tX = .exe\n+ifneq (,$(wildcard ../THIS_IS_MSYSGIT))\n+\thtmldir=doc/git/html/\n+\tprefix =\n+\tINSTALL = /bin/install\n+\tEXTLIBS += /mingw/lib/libz.a\n+\tNO_R_TO_GCC_LINKER = YesPlease\n+\tINTERNAL_QSORT = YesPlease\n+else\n+\tNO_CURL = YesPlease\n+endif\n+endif\n+\n+-include config.mak.autogen\n+-include config.mak\n+\n+LIB_H += advice.h\n+LIB_H += archive.h\n+LIB_H += attr.h\n+LIB_H += blob.h\n+LIB_H += builtin.h\n+LIB_H += cache.h\n+LIB_H += cache-tree.h\n+LIB_H += color.h\n+LIB_H += commit.h\n+LIB_H += compat/bswap.h\n+LIB_H += compat/cygwin.h\n+LIB_H += compat/mingw.h\n+LIB_H += compat/win32/pthread.h\n+LIB_H += csum-file.h\n+LIB_H += decorate.h\n+LIB_H += delta.h\n+LIB_H += diffcore.h\n+LIB_H += diff.h\n+LIB_H += dir.h\n+LIB_H += exec_cmd.h\n+LIB_H += fsck.h\n+LIB_H += git-compat-util.h\n+LIB_H += graph.h\n+LIB_H += grep.h\n+LIB_H += hash.h\n+LIB_H += help.h\n+LIB_H += levenshtein.h\n+LIB_H += list-objects.h\n+LIB_H += ll-merge.h\n+LIB_H += log-tree.h\n+LIB_H += mailmap.h\n+LIB_H += merge-recursive.h\n+LIB_H += notes.h\n+LIB_H += notes-cache.h\n+LIB_H += object.h\n+LIB_H += pack.h\n+LIB_H += pack-refs.h\n+LIB_H += pack-revindex.h\n+LIB_H += parse-options.h\n+LIB_H += patch-ids.h\n+LIB_H += pkt-line.h\n+LIB_H += progress.h\n+LIB_H += quote.h\n+LIB_H += reflog-walk.h\n+LIB_H += refs.h\n+LIB_H += remote.h\n+LIB_H += rerere.h\n+LIB_H += resolve-undo.h\n+LIB_H += revision.h\n+LIB_H += run-command.h\n+LIB_H += sha1-lookup.h\n+LIB_H += sideband.h\n+LIB_H += sigchain.h\n+LIB_H += strbuf.h\n+LIB_H += string-list.h\n+LIB_H += submodule.h\n+LIB_H += tag.h\n+LIB_H += transport.h\n+LIB_H += tree.h\n+LIB_H += tree-walk.h\n+LIB_H += unpack-trees.h\n+LIB_H += userdiff.h\n+LIB_H += utf8.h\n+LIB_H += xdiff-interface.h\n+LIB_H += xdiff/xdiff.h\n+\n+LIB_OBJS += abspath.o\n+LIB_OBJS += advice.o\n+LIB_OBJS += alias.o\n+LIB_OBJS += alloc.o\n+LIB_OBJS += archive.o\n+LIB_OBJS += archive-tar.o\n+LIB_OBJS += archive-zip.o\n+LIB_OBJS += attr.o\n+LIB_OBJS += base85.o\n+LIB_OBJS += bisect.o\n+LIB_OBJS += blob.o\n+LIB_OBJS += branch.o\n+LIB_OBJS += bundle.o\n+LIB_OBJS += cache-tree.o\n+LIB_OBJS += color.o\n+LIB_OBJS += combine-diff.o\n+LIB_OBJS += commit.o\n+LIB_OBJS += config.o\n+LIB_OBJS += connect.o\n+LIB_OBJS += convert.o\n+LIB_OBJS += copy.o\n+LIB_OBJS += csum-file.o\n+LIB_OBJS += ctype.o\n+LIB_OBJS += date.o\n+LIB_OBJS += decorate.o\n+LIB_OBJS += diffcore-break.o\n+LIB_OBJS += diffcore-delta.o\n+LIB_OBJS += diffcore-order.o\n+LIB_OBJS += diffcore-pickaxe.o\n+LIB_OBJS += diffcore-rename.o\n+LIB_OBJS += diff-delta.o\n+LIB_OBJS += diff-lib.o\n+LIB_OBJS += diff-no-index.o\n+LIB_OBJS += diff.o\n+LIB_OBJS += dir.o\n+LIB_OBJS += editor.o\n+LIB_OBJS += entry.o\n+LIB_OBJS += environment.o\n+LIB_OBJS += exec_cmd.o\n+LIB_OBJS += fsck.o\n+LIB_OBJS += graph.o\n+LIB_OBJS += grep.o\n+LIB_OBJS += hash.o\n+LIB_OBJS += help.o\n+LIB_OBJS += hex.o\n+LIB_OBJS += ident.o\n+LIB_OBJS += levenshtein.o\n+LIB_OBJS += list-objects.o\n+LIB_OBJS += ll-merge.o\n+LIB_OBJS += lockfile.o\n+LIB_OBJS += log-tree.o\n+LIB_OBJS += mailmap.o\n+LIB_OBJS += match-trees.o\n+LIB_OBJS += merge-file.o\n+LIB_OBJS += merge-recursive.o\n+LIB_OBJS += name-hash.o\n+LIB_OBJS += notes.o\n+LIB_OBJS += notes-cache.o\n+LIB_OBJS += object.o\n+LIB_OBJS += pack-check.o\n+LIB_OBJS += pack-refs.o\n+LIB_OBJS += pack-revindex.o\n+LIB_OBJS += pack-write.o\n+LIB_OBJS += pager.o\n+LIB_OBJS += parse-options.o\n+LIB_OBJS += patch-delta.o\n+LIB_OBJS += patch-ids.o\n+LIB_OBJS += path.o\n+LIB_OBJS += pkt-line.o\n+LIB_OBJS += preload-index.o\n+LIB_OBJS += pretty.o\n+LIB_OBJS += progress.o\n+LIB_OBJS += quote.o\n+LIB_OBJS += reachable.o\n+LIB_OBJS += read-cache.o\n+LIB_OBJS += reflog-walk.o\n+LIB_OBJS += refs.o\n+LIB_OBJS += remote.o\n+LIB_OBJS += replace_object.o\n+LIB_OBJS += rerere.o\n+LIB_OBJS += resolve-undo.o\n+LIB_OBJS += revision.o\n+LIB_OBJS += run-command.o\n+LIB_OBJS += server-info.o\n+LIB_OBJS += setup.o\n+LIB_OBJS += sha1-lookup.o\n+LIB_OBJS += sha1_file.o\n+LIB_OBJS += sha1_name.o\n+LIB_OBJS += shallow.o\n+LIB_OBJS += sideband.o\n+LIB_OBJS += sigchain.o\n+LIB_OBJS += strbuf.o\n+LIB_OBJS += string-list.o\n+LIB_OBJS += submodule.o\n+LIB_OBJS += symlinks.o\n+LIB_OBJS += tag.o\n+LIB_OBJS += trace.o\n+LIB_OBJS += transport.o\n+LIB_OBJS += transport-helper.o\n+LIB_OBJS += tree-diff.o\n+LIB_OBJS += tree.o\n+LIB_OBJS += tree-walk.o\n+LIB_OBJS += unpack-trees.o\n+LIB_OBJS += url.o\n+LIB_OBJS += usage.o\n+LIB_OBJS += userdiff.o\n+LIB_OBJS += utf8.o\n+LIB_OBJS += walker.o\n+LIB_OBJS += wrapper.o\n+LIB_OBJS += write_or_die.o\n+LIB_OBJS += ws.o\n+LIB_OBJS += wt-status.o\n+LIB_OBJS += xdiff-interface.o\n+\n+BUILTIN_OBJS += builtin/add.o\n+BUILTIN_OBJS += builtin/annotate.o\n+BUILTIN_OBJS += builtin/apply.o\n+BUILTIN_OBJS += builtin/archive.o\n+BUILTIN_OBJS += builtin/bisect--helper.o\n+BUILTIN_OBJS += builtin/blame.o\n+BUILTIN_OBJS += builtin/branch.o\n+BUILTIN_OBJS += builtin/bundle.o\n+BUILTIN_OBJS += builtin/cat-file.o\n+BUILTIN_OBJS += builtin/check-attr.o\n+BUILTIN_OBJS += builtin/check-ref-format.o\n+BUILTIN_OBJS += builtin/checkout-index.o\n+BUILTIN_OBJS += builtin/checkout.o\n+BUILTIN_OBJS += builtin/clean.o\n+BUILTIN_OBJS += builtin/clone.o\n+BUILTIN_OBJS += builtin/commit-tree.o\n+BUILTIN_OBJS += builtin/commit.o\n+BUILTIN_OBJS += builtin/config.o\n+BUILTIN_OBJS += builtin/count-objects.o\n+BUILTIN_OBJS += builtin/describe.o\n+BUILTIN_OBJS += builtin/diff-files.o\n+BUILTIN_OBJS += builtin/diff-index.o\n+BUILTIN_OBJS += builtin/diff-tree.o\n+BUILTIN_OBJS += builtin/diff.o\n+BUILTIN_OBJS += builtin/fast-export.o\n+BUILTIN_OBJS += builtin/fetch-pack.o\n+BUILTIN_OBJS += builtin/fetch.o\n+BUILTIN_OBJS += builtin/fmt-merge-msg.o\n+BUILTIN_OBJS += builtin/for-each-ref.o\n+BUILTIN_OBJS += builtin/fsck.o\n+BUILTIN_OBJS += builtin/gc.o\n+BUILTIN_OBJS += builtin/grep.o\n+BUILTIN_OBJS += builtin/hash-object.o\n+BUILTIN_OBJS += builtin/help.o\n+BUILTIN_OBJS += builtin/index-pack.o\n+BUILTIN_OBJS += builtin/init-db.o\n+BUILTIN_OBJS += builtin/log.o\n+BUILTIN_OBJS += builtin/ls-files.o\n+BUILTIN_OBJS += builtin/ls-remote.o\n+BUILTIN_OBJS += builtin/ls-tree.o\n+BUILTIN_OBJS += builtin/mailinfo.o\n+BUILTIN_OBJS += builtin/mailsplit.o\n+BUILTIN_OBJS += builtin/merge.o\n+BUILTIN_OBJS += builtin/merge-base.o\n+BUILTIN_OBJS += builtin/merge-file.o\n+BUILTIN_OBJS += builtin/merge-index.o\n+BUILTIN_OBJS += builtin/merge-ours.o\n+BUILTIN_OBJS += builtin/merge-recursive.o\n+BUILTIN_OBJS += builtin/merge-tree.o\n+BUILTIN_OBJS += builtin/mktag.o\n+BUILTIN_OBJS += builtin/mktree.o\n+BUILTIN_OBJS += builtin/mv.o\n+BUILTIN_OBJS += builtin/name-rev.o\n+BUILTIN_OBJS += builtin/notes.o\n+BUILTIN_OBJS += builtin/pack-objects.o\n+BUILTIN_OBJS += builtin/pack-redundant.o\n+BUILTIN_OBJS += builtin/pack-refs.o\n+BUILTIN_OBJS += builtin/patch-id.o\n+BUILTIN_OBJS += builtin/prune-packed.o\n+BUILTIN_OBJS += builtin/prune.o\n+BUILTIN_OBJS += builtin/push.o\n+BUILTIN_OBJS += builtin/read-tree.o\n+BUILTIN_OBJS += builtin/receive-pack.o\n+BUILTIN_OBJS += builtin/reflog.o\n+BUILTIN_OBJS += builtin/remote.o\n+BUILTIN_OBJS += builtin/replace.o\n+BUILTIN_OBJS += builtin/rerere.o\n+BUILTIN_OBJS += builtin/reset.o\n+BUILTIN_OBJS += builtin/rev-list.o\n+BUILTIN_OBJS += builtin/rev-parse.o\n+BUILTIN_OBJS += builtin/revert.o\n+BUILTIN_OBJS += builtin/rm.o\n+BUILTIN_OBJS += builtin/send-pack.o\n+BUILTIN_OBJS += builtin/shortlog.o\n+BUILTIN_OBJS += builtin/show-branch.o\n+BUILTIN_OBJS += builtin/show-ref.o\n+BUILTIN_OBJS += builtin/stripspace.o\n+BUILTIN_OBJS += builtin/symbolic-ref.o\n+BUILTIN_OBJS += builtin/tag.o\n+BUILTIN_OBJS += builtin/tar-tree.o\n+BUILTIN_OBJS += builtin/unpack-file.o\n+BUILTIN_OBJS += builtin/unpack-objects.o\n+BUILTIN_OBJS += builtin/update-index.o\n+BUILTIN_OBJS += builtin/update-ref.o\n+BUILTIN_OBJS += builtin/update-server-info.o\n+BUILTIN_OBJS += builtin/upload-archive.o\n+BUILTIN_OBJS += builtin/var.o\n+BUILTIN_OBJS += builtin/verify-pack.o\n+BUILTIN_OBJS += builtin/verify-tag.o\n+BUILTIN_OBJS += builtin/write-tree.o\n \n--include config.mak.autogen\n--include config.mak\n+GITLIBS = $(LIB_FILE) $(XDIFF_LIB)\n \n ifdef CHECK_HEADER_DEPENDENCIES\n COMPUTE_HEADER_DEPENDENCIES =\n-- \n1.7.2.3\n"},{"id":"155848","messageId":"1289745857-16704-3-git-send-email-avarab@gmail.com","threadId":"25743","inReplyTo":"1289745857-16704-1-git-send-email-avarab@gmail.com","subject":"[PATCH 2/4] t7004-tag.sh: re-arrange git tag comment for clarity","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-11-14T14:44:15Z","receivedAt":"2010-11-14T14:44:15Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Split the \"message in editor has initial comment\" test into three\ntests. The motivation is to be able to only skip the middle part under\nNO_GETTEXT_POISON.\n\nIn addition the return value of 'git tag' was being returned. We now\ncheck that it's non-zero. I used ! instead of test_must_fail so that\nthe GIT_EDITOR variable was only used in this command invocation, and\nbecause the surrounding tests use this style.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n t/t7004-tag.sh |   20 +++++++++++++++-----\n 1 files changed, 15 insertions(+), 5 deletions(-)\n\ndiff --git a/t/t7004-tag.sh b/t/t7004-tag.sh\nindex ac943f5..700b556 100755\n--- a/t/t7004-tag.sh\n+++ b/t/t7004-tag.sh\n@@ -1051,13 +1051,23 @@ test_expect_success \\\n \n test_expect_success \\\n \t'message in editor has initial comment' '\n-\tGIT_EDITOR=cat git tag -a initial-comment > actual\n+\t! (GIT_EDITOR=cat git tag -a initial-comment > actual)\n+'\n+\n+test_expect_success \\\n+\t'message in editor has initial comment: first line' '\n \t# check the first line --- should be empty\n-\tfirst=$(sed -e 1q <actual) &&\n-\ttest -z \"$first\" &&\n+\techo >first.expect &&\n+\tsed -e 1q <actual >first.actual &&\n+\ttest_cmp first.expect first.actual\n+'\n+\n+test_expect_success \\\n+\t'message in editor has initial comment: remainder' '\n \t# remove commented lines from the remainder -- should be empty\n-\trest=$(sed -e 1d -e '/^#/d' <actual) &&\n-\ttest -z \"$rest\"\n+\t>rest.expect\n+\tsed -e 1d -e '/^#/d' <actual >rest.actual &&\n+\ttest_cmp rest.expect rest.actual\n '\n \n get_tag_header reuse $commit commit $time >expect\n-- \n1.7.2.3\n"},{"id":"155849","messageId":"1289745857-16704-4-git-send-email-avarab@gmail.com","threadId":"25743","inReplyTo":"1289745857-16704-1-git-send-email-avarab@gmail.com","subject":"[PATCH 3/4] tests: use test_cmp instead of piping to diff(1)","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-11-14T14:44:16Z","receivedAt":"2010-11-14T14:44:16Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Change submodule tests that piped to diff(1) to use test_cmp. The\nresulting unified diff is easier to read.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n t/t4041-diff-submodule-option.sh |   96 +++++++++++++++++++++++++-------------\n t/t7401-submodule-summary.sh     |   47 ++++++++++++------\n 2 files changed, 95 insertions(+), 48 deletions(-)\n\ndiff --git a/t/t4041-diff-submodule-option.sh b/t/t4041-diff-submodule-option.sh\nindex 995bdfa..bf9a752 100755\n--- a/t/t4041-diff-submodule-option.sh\n+++ b/t/t4041-diff-submodule-option.sh\n@@ -37,9 +37,10 @@ head1=$(add_file sm1 foo1 foo2)\n test_expect_success 'added submodule' \"\n \tgit add sm1 &&\n \tgit diff-index -p --submodule=log HEAD >actual &&\n-\tdiff actual - <<-EOF\n+\tcat >expected <<-EOF &&\n Submodule sm1 0000000...$head1 (new submodule)\n EOF\n+\ttest_cmp expected actual\n \"\n \n commit_file sm1 &&\n@@ -47,33 +48,36 @@ head2=$(add_file sm1 foo3)\n \n test_expect_success 'modified submodule(forward)' \"\n \tgit diff-index -p --submodule=log HEAD >actual &&\n-\tdiff actual - <<-EOF\n+\tcat >expected <<-EOF &&\n Submodule sm1 $head1..$head2:\n   > Add foo3\n EOF\n+\ttest_cmp expected actual\n \"\n \n test_expect_success 'modified submodule(forward)' \"\n \tgit diff --submodule=log >actual &&\n-\tdiff actual - <<-EOF\n+\tcat >expected <<-EOF &&\n Submodule sm1 $head1..$head2:\n   > Add foo3\n EOF\n+\ttest_cmp expected actual\n \"\n \n test_expect_success 'modified submodule(forward) --submodule' \"\n \tgit diff --submodule >actual &&\n-\tdiff actual - <<-EOF\n+\tcat >expected <<-EOF &&\n Submodule sm1 $head1..$head2:\n   > Add foo3\n EOF\n+\ttest_cmp expected actual\n \"\n \n fullhead1=$(cd sm1; git rev-list --max-count=1 $head1)\n fullhead2=$(cd sm1; git rev-list --max-count=1 $head2)\n test_expect_success 'modified submodule(forward) --submodule=short' \"\n \tgit diff --submodule=short >actual &&\n-\tdiff actual - <<-EOF\n+\tcat >expected <<-EOF &&\n diff --git a/sm1 b/sm1\n index $head1..$head2 160000\n --- a/sm1\n@@ -82,6 +86,7 @@ index $head1..$head2 160000\n -Subproject commit $fullhead1\n +Subproject commit $fullhead2\n EOF\n+\ttest_cmp expected actual\n \"\n \n commit_file sm1 &&\n@@ -93,24 +98,26 @@ head3=$(\n \n test_expect_success 'modified submodule(backward)' \"\n \tgit diff-index -p --submodule=log HEAD >actual &&\n-\tdiff actual - <<-EOF\n+\tcat >expected <<-EOF &&\n Submodule sm1 $head2..$head3 (rewind):\n   < Add foo3\n   < Add foo2\n EOF\n+\ttest_cmp expected actual\n \"\n \n head4=$(add_file sm1 foo4 foo5) &&\n head4_full=$(GIT_DIR=sm1/.git git rev-parse --verify HEAD)\n test_expect_success 'modified submodule(backward and forward)' \"\n \tgit diff-index -p --submodule=log HEAD >actual &&\n-\tdiff actual - <<-EOF\n+\tcat >expected <<-EOF &&\n Submodule sm1 $head2...$head4:\n   > Add foo5\n   > Add foo4\n   < Add foo3\n   < Add foo2\n EOF\n+\ttest_cmp expected actual\n \"\n \n commit_file sm1 &&\n@@ -123,7 +130,7 @@ mv sm1-bak sm1\n \n test_expect_success 'typechanged submodule(submodule->blob), --cached' \"\n \tgit diff --submodule=log --cached >actual &&\n-\tdiff actual - <<-EOF\n+\tcat >expected <<-EOF &&\n Submodule sm1 41fbea9...0000000 (submodule deleted)\n diff --git a/sm1 b/sm1\n new file mode 100644\n@@ -133,11 +140,12 @@ index 0000000..9da5fb8\n @@ -0,0 +1 @@\n +sm1\n EOF\n+\ttest_cmp expected actual\n \"\n \n test_expect_success 'typechanged submodule(submodule->blob)' \"\n \tgit diff --submodule=log >actual &&\n-\tdiff actual - <<-EOF\n+\tcat >expected <<-EOF &&\n diff --git a/sm1 b/sm1\n deleted file mode 100644\n index 9da5fb8..0000000\n@@ -147,13 +155,14 @@ index 9da5fb8..0000000\n -sm1\n Submodule sm1 0000000...$head4 (new submodule)\n EOF\n+\ttest_cmp expected actual\n \"\n \n rm -rf sm1 &&\n git checkout-index sm1\n test_expect_success 'typechanged submodule(submodule->blob)' \"\n \tgit diff-index -p --submodule=log HEAD >actual &&\n-\tdiff actual - <<-EOF\n+\tcat >expected <<-EOF &&\n Submodule sm1 $head4...0000000 (submodule deleted)\n diff --git a/sm1 b/sm1\n new file mode 100644\n@@ -163,6 +172,7 @@ index 0000000..$head5\n @@ -0,0 +1 @@\n +sm1\n EOF\n+\ttest_cmp expected actual\n \"\n \n rm -f sm1 &&\n@@ -171,15 +181,16 @@ head6=$(add_file sm1 foo6 foo7)\n fullhead6=$(cd sm1; git rev-list --max-count=1 $head6)\n test_expect_success 'nonexistent commit' \"\n \tgit diff-index -p --submodule=log HEAD >actual &&\n-\tdiff actual - <<-EOF\n+\tcat >expected <<-EOF &&\n Submodule sm1 $head4...$head6 (commits not present)\n EOF\n+\ttest_cmp expected actual\n \"\n \n commit_file\n test_expect_success 'typechanged submodule(blob->submodule)' \"\n \tgit diff-index -p --submodule=log HEAD >actual &&\n-\tdiff actual - <<-EOF\n+\tcat >expected <<-EOF &&\n diff --git a/sm1 b/sm1\n deleted file mode 100644\n index $head5..0000000\n@@ -189,21 +200,24 @@ index $head5..0000000\n -sm1\n Submodule sm1 0000000...$head6 (new submodule)\n EOF\n+\ttest_cmp expected actual\n \"\n \n commit_file sm1 &&\n test_expect_success 'submodule is up to date' \"\n \tgit diff-index -p --submodule=log HEAD >actual &&\n-\tdiff actual - <<-EOF\n+\tcat >expected <<-EOF &&\n EOF\n+\ttest_cmp expected actual\n \"\n \n test_expect_success 'submodule contains untracked content' \"\n \techo new > sm1/new-file &&\n \tgit diff-index -p --submodule=log HEAD >actual &&\n-\tdiff actual - <<-EOF\n+\tcat >expected <<-EOF &&\n Submodule sm1 contains untracked content\n EOF\n+\ttest_cmp expected actual\n \"\n \n test_expect_success 'submodule contains untracked content (untracked ignored)' \"\n@@ -224,18 +238,20 @@ test_expect_success 'submodule contains untracked content (all ignored)' \"\n test_expect_success 'submodule contains untracked and modifed content' \"\n \techo new > sm1/foo6 &&\n \tgit diff-index -p --submodule=log HEAD >actual &&\n-\tdiff actual - <<-EOF\n+\tcat >expected <<-EOF &&\n Submodule sm1 contains untracked content\n Submodule sm1 contains modified content\n EOF\n+\ttest_cmp expected actual\n \"\n \n test_expect_success 'submodule contains untracked and modifed content (untracked ignored)' \"\n \techo new > sm1/foo6 &&\n \tgit diff-index -p --ignore-submodules=untracked --submodule=log HEAD >actual &&\n-\tdiff actual - <<-EOF\n+\tcat >expected <<-EOF &&\n Submodule sm1 contains modified content\n EOF\n+\ttest_cmp expected actual\n \"\n \n test_expect_success 'submodule contains untracked and modifed content (dirty ignored)' \"\n@@ -253,45 +269,50 @@ test_expect_success 'submodule contains untracked and modifed content (all ignor\n test_expect_success 'submodule contains modifed content' \"\n \trm -f sm1/new-file &&\n \tgit diff-index -p --submodule=log HEAD >actual &&\n-\tdiff actual - <<-EOF\n+\tcat >expected <<-EOF &&\n Submodule sm1 contains modified content\n EOF\n+\ttest_cmp expected actual\n \"\n \n (cd sm1; git commit -mchange foo6 >/dev/null) &&\n head8=$(cd sm1; git rev-parse --verify HEAD | cut -c1-7) &&\n test_expect_success 'submodule is modified' \"\n \tgit diff-index -p --submodule=log HEAD >actual &&\n-\tdiff actual - <<-EOF\n+\tcat >expected <<-EOF &&\n Submodule sm1 $head6..$head8:\n   > change\n EOF\n+\ttest_cmp expected actual\n \"\n \n test_expect_success 'modified submodule contains untracked content' \"\n \techo new > sm1/new-file &&\n \tgit diff-index -p --submodule=log HEAD >actual &&\n-\tdiff actual - <<-EOF\n+\tcat >expected <<-EOF &&\n Submodule sm1 contains untracked content\n Submodule sm1 $head6..$head8:\n   > change\n EOF\n+\ttest_cmp expected actual\n \"\n \n test_expect_success 'modified submodule contains untracked content (untracked ignored)' \"\n \tgit diff-index -p --ignore-submodules=untracked --submodule=log HEAD >actual &&\n-\tdiff actual - <<-EOF\n+\tcat >expected <<-EOF &&\n Submodule sm1 $head6..$head8:\n   > change\n EOF\n+\ttest_cmp expected actual\n \"\n \n test_expect_success 'modified submodule contains untracked content (dirty ignored)' \"\n \tgit diff-index -p --ignore-submodules=dirty --submodule=log HEAD >actual &&\n-\tdiff actual - <<-EOF\n+\tcat >expected <<-EOF &&\n Submodule sm1 $head6..$head8:\n   > change\n EOF\n+\ttest_cmp expected actual\n \"\n \n test_expect_success 'modified submodule contains untracked content (all ignored)' \"\n@@ -302,31 +323,34 @@ test_expect_success 'modified submodule contains untracked content (all ignored)\n test_expect_success 'modified submodule contains untracked and modifed content' \"\n \techo modification >> sm1/foo6 &&\n \tgit diff-index -p --submodule=log HEAD >actual &&\n-\tdiff actual - <<-EOF\n+\tcat >expected <<-EOF &&\n Submodule sm1 contains untracked content\n Submodule sm1 contains modified content\n Submodule sm1 $head6..$head8:\n   > change\n EOF\n+\ttest_cmp expected actual\n \"\n \n test_expect_success 'modified submodule contains untracked and modifed content (untracked ignored)' \"\n \techo modification >> sm1/foo6 &&\n \tgit diff-index -p --ignore-submodules=untracked --submodule=log HEAD >actual &&\n-\tdiff actual - <<-EOF\n+\tcat >expected <<-EOF &&\n Submodule sm1 contains modified content\n Submodule sm1 $head6..$head8:\n   > change\n EOF\n+\ttest_cmp expected actual\n \"\n \n test_expect_success 'modified submodule contains untracked and modifed content (dirty ignored)' \"\n \techo modification >> sm1/foo6 &&\n \tgit diff-index -p --ignore-submodules=dirty --submodule=log HEAD >actual &&\n-\tdiff actual - <<-EOF\n+\tcat >expected <<-EOF &&\n Submodule sm1 $head6..$head8:\n   > change\n EOF\n+\ttest_cmp expected actual\n \"\n \n test_expect_success 'modified submodule contains untracked and modifed content (all ignored)' \"\n@@ -338,19 +362,21 @@ test_expect_success 'modified submodule contains untracked and modifed content (\n test_expect_success 'modified submodule contains modifed content' \"\n \trm -f sm1/new-file &&\n \tgit diff-index -p --submodule=log HEAD >actual &&\n-\tdiff actual - <<-EOF\n+\tcat >expected <<-EOF &&\n Submodule sm1 contains modified content\n Submodule sm1 $head6..$head8:\n   > change\n EOF\n+\ttest_cmp expected actual\n \"\n \n rm -rf sm1\n test_expect_success 'deleted submodule' \"\n \tgit diff-index -p --submodule=log HEAD >actual &&\n-\tdiff actual - <<-EOF\n+\tcat >expected <<-EOF &&\n Submodule sm1 $head6...0000000 (submodule deleted)\n EOF\n+\ttest_cmp expected actual\n \"\n \n test_create_repo sm2 &&\n@@ -359,41 +385,45 @@ git add sm2\n \n test_expect_success 'multiple submodules' \"\n \tgit diff-index -p --submodule=log HEAD >actual &&\n-\tdiff actual - <<-EOF\n+\tcat >expected <<-EOF &&\n Submodule sm1 $head6...0000000 (submodule deleted)\n Submodule sm2 0000000...$head7 (new submodule)\n EOF\n+\ttest_cmp expected actual\n \"\n \n test_expect_success 'path filter' \"\n \tgit diff-index -p --submodule=log HEAD sm2 >actual &&\n-\tdiff actual - <<-EOF\n+\tcat >expected <<-EOF &&\n Submodule sm2 0000000...$head7 (new submodule)\n EOF\n+\ttest_cmp expected actual\n \"\n \n commit_file sm2\n test_expect_success 'given commit' \"\n \tgit diff-index -p --submodule=log HEAD^ >actual &&\n-\tdiff actual - <<-EOF\n+\tcat >expected <<-EOF &&\n Submodule sm1 $head6...0000000 (submodule deleted)\n Submodule sm2 0000000...$head7 (new submodule)\n EOF\n+\ttest_cmp expected actual\n \"\n \n test_expect_success 'given commit --submodule' \"\n \tgit diff-index -p --submodule HEAD^ >actual &&\n-\tdiff actual - <<-EOF\n+\tcat >expected <<-EOF &&\n Submodule sm1 $head6...0000000 (submodule deleted)\n Submodule sm2 0000000...$head7 (new submodule)\n EOF\n+\ttest_cmp expected actual\n \"\n \n fullhead7=$(cd sm2; git rev-list --max-count=1 $head7)\n \n test_expect_success 'given commit --submodule=short' \"\n \tgit diff-index -p --submodule=short HEAD^ >actual &&\n-\tdiff actual - <<-EOF\n+\tcat >expected <<-EOF &&\n diff --git a/sm1 b/sm1\n deleted file mode 160000\n index $head6..0000000\n@@ -409,6 +439,7 @@ index 0000000..$head7\n @@ -0,0 +1 @@\n +Subproject commit $fullhead7\n EOF\n+\ttest_cmp expected actual\n \"\n \n test_expect_success 'setup .git file for sm2' '\n@@ -420,10 +451,11 @@ test_expect_success 'setup .git file for sm2' '\n \n test_expect_success 'diff --submodule with .git file' '\n \tgit diff --submodule HEAD^ >actual &&\n-\tdiff actual - <<-EOF\n+\tcat >expected <<-EOF &&\n Submodule sm1 $head6...0000000 (submodule deleted)\n Submodule sm2 0000000...$head7 (new submodule)\n EOF\n+\ttest_cmp expected actual\n '\n \n test_done\ndiff --git a/t/t7401-submodule-summary.sh b/t/t7401-submodule-summary.sh\nindex 2945844..9963f29 100755\n--- a/t/t7401-submodule-summary.sh\n+++ b/t/t7401-submodule-summary.sh\n@@ -37,11 +37,12 @@ head1=$(add_file sm1 foo1 foo2)\n test_expect_success 'added submodule' \"\n \tgit add sm1 &&\n \tgit submodule summary >actual &&\n-\tdiff actual - <<-EOF\n+\tcat >expected <<-EOF &&\n * sm1 0000000...$head1 (2):\n   > Add foo2\n \n EOF\n+\ttest_cmp expected actual\n \"\n \n commit_file sm1 &&\n@@ -49,20 +50,22 @@ head2=$(add_file sm1 foo3)\n \n test_expect_success 'modified submodule(forward)' \"\n \tgit submodule summary >actual &&\n-\tdiff actual - <<-EOF\n+\tcat >expected <<-EOF &&\n * sm1 $head1...$head2 (1):\n   > Add foo3\n \n EOF\n+\ttest_cmp expected actual\n \"\n \n test_expect_success 'modified submodule(forward), --files' \"\n \tgit submodule summary --files >actual &&\n-\tdiff actual - <<-EOF\n+\tcat >expected <<-EOF &&\n * sm1 $head1...$head2 (1):\n   > Add foo3\n \n EOF\n+\ttest_cmp expected actual\n \"\n \n commit_file sm1 &&\n@@ -74,19 +77,20 @@ head3=$(\n \n test_expect_success 'modified submodule(backward)' \"\n     git submodule summary >actual &&\n-    diff actual - <<-EOF\n+    cat >expected <<-EOF &&\n * sm1 $head2...$head3 (2):\n   < Add foo3\n   < Add foo2\n \n EOF\n+\ttest_cmp expected actual\n \"\n \n head4=$(add_file sm1 foo4 foo5) &&\n head4_full=$(GIT_DIR=sm1/.git git rev-parse --verify HEAD)\n test_expect_success 'modified submodule(backward and forward)' \"\n     git submodule summary >actual &&\n-    diff actual - <<-EOF\n+    cat >expected <<-EOF &&\n * sm1 $head2...$head4 (4):\n   > Add foo5\n   > Add foo4\n@@ -94,17 +98,19 @@ test_expect_success 'modified submodule(backward and forward)' \"\n   < Add foo2\n \n EOF\n+\ttest_cmp expected actual\n \"\n \n test_expect_success '--summary-limit' \"\n     git submodule summary -n 3 >actual &&\n-    diff actual - <<-EOF\n+    cat >expected <<-EOF &&\n * sm1 $head2...$head4 (4):\n   > Add foo5\n   > Add foo4\n   < Add foo3\n \n EOF\n+    test_cmp expected actual\n \"\n \n commit_file sm1 &&\n@@ -117,30 +123,33 @@ mv sm1-bak sm1\n \n test_expect_success 'typechanged submodule(submodule->blob), --cached' \"\n     git submodule summary --cached >actual &&\n-    diff actual - <<-EOF\n+    cat >expected <<-EOF &&\n * sm1 $head4(submodule)->$head5(blob) (3):\n   < Add foo5\n \n EOF\n+\ttest_cmp actual expected\n \"\n \n test_expect_success 'typechanged submodule(submodule->blob), --files' \"\n     git submodule summary --files >actual &&\n-    diff actual - <<-EOF\n+    cat >expected <<-EOF &&\n * sm1 $head5(blob)->$head4(submodule) (3):\n   > Add foo5\n \n EOF\n+    test_cmp actual expected\n \"\n \n rm -rf sm1 &&\n git checkout-index sm1\n test_expect_success 'typechanged submodule(submodule->blob)' \"\n     git submodule summary >actual &&\n-    diff actual - <<-EOF\n+    cat >expected <<-EOF &&\n * sm1 $head4(submodule)->$head5(blob):\n \n EOF\n+    test_cmp actual expected\n \"\n \n rm -f sm1 &&\n@@ -148,31 +157,34 @@ test_create_repo sm1 &&\n head6=$(add_file sm1 foo6 foo7)\n test_expect_success 'nonexistent commit' \"\n     git submodule summary >actual &&\n-    diff actual - <<-EOF\n+    cat >expected <<-EOF &&\n * sm1 $head4...$head6:\n   Warn: sm1 doesn't contain commit $head4_full\n \n EOF\n+    test_cmp actual expected\n \"\n \n commit_file\n test_expect_success 'typechanged submodule(blob->submodule)' \"\n     git submodule summary >actual &&\n-    diff actual - <<-EOF\n+    cat >expected <<-EOF &&\n * sm1 $head5(blob)->$head6(submodule) (2):\n   > Add foo7\n \n EOF\n+    test_cmp expected actual\n \"\n \n commit_file sm1 &&\n rm -rf sm1\n test_expect_success 'deleted submodule' \"\n     git submodule summary >actual &&\n-    diff actual - <<-EOF\n+    cat >expected <<-EOF &&\n * sm1 $head6...0000000:\n \n EOF\n+    test_cmp expected actual\n \"\n \n test_create_repo sm2 &&\n@@ -181,39 +193,42 @@ git add sm2\n \n test_expect_success 'multiple submodules' \"\n     git submodule summary >actual &&\n-    diff actual - <<-EOF\n+    cat >expected <<-EOF &&\n * sm1 $head6...0000000:\n \n * sm2 0000000...$head7 (2):\n   > Add foo9\n \n EOF\n+    test_cmp expected actual\n \"\n \n test_expect_success 'path filter' \"\n     git submodule summary sm2 >actual &&\n-    diff actual - <<-EOF\n+    cat >expected <<-EOF &&\n * sm2 0000000...$head7 (2):\n   > Add foo9\n \n EOF\n+    test_cmp expected actual\n \"\n \n commit_file sm2\n test_expect_success 'given commit' \"\n     git submodule summary HEAD^ >actual &&\n-    diff actual - <<-EOF\n+    cat >expected <<-EOF &&\n * sm1 $head6...0000000:\n \n * sm2 0000000...$head7 (2):\n   > Add foo9\n \n EOF\n+    test_cmp expected actual\n \"\n \n test_expect_success '--for-status' \"\n     git submodule summary --for-status HEAD^ >actual &&\n-    test_cmp actual - <<EOF\n+\ttest_cmp actual - <<EOF\n # Submodule changes to be committed:\n #\n # * sm1 $head6...0000000:\n-- \n1.7.2.3\n"},{"id":"155850","messageId":"1289745857-16704-5-git-send-email-avarab@gmail.com","threadId":"25743","inReplyTo":"1289745857-16704-1-git-send-email-avarab@gmail.com","subject":"[PATCH 4/4] builtin: use builtin.h for all builtin commands","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-11-14T14:44:17Z","receivedAt":"2010-11-14T14:44:17Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Change the builtin/*.c files and wt-status.c files which weren't using\nbuiltin.h to use it, also remove any git-compat-util.h, strbuf.h and\ncache.h from those files. We can trust on builtin.h including them.\n\nbuiltin.h also includes commit.h and notes.h. But I haven't removed\nthese includes. They're redundant now, but we may want to remove them\nfrom builtin.h in the future.\n\nThis impeded my efforts to gettextize git, since I'd otherwise have to\nadd gettext.h to all of these. Using builtin.h is a good idea in any\ncase, since it's defining the prototypes for the cmd_* functions that\nthese files define.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n builtin/clone.c           |    3 +--\n builtin/fetch-pack.c      |    2 +-\n builtin/hash-object.c     |    2 +-\n builtin/index-pack.c      |    2 +-\n builtin/merge-index.c     |    2 +-\n builtin/merge-recursive.c |    2 +-\n builtin/merge-tree.c      |    2 +-\n builtin/mktag.c           |    2 +-\n builtin/pack-redundant.c  |    2 +-\n builtin/pack-refs.c       |    2 +-\n builtin/patch-id.c        |    2 +-\n builtin/receive-pack.c    |    2 +-\n builtin/remote.c          |    3 +--\n builtin/reset.c           |    2 +-\n builtin/send-pack.c       |    2 +-\n builtin/unpack-file.c     |    2 +-\n builtin/var.c             |    2 +-\n wt-status.c               |    2 +-\n 18 files changed, 18 insertions(+), 20 deletions(-)\n\ndiff --git a/builtin/clone.c b/builtin/clone.c\nindex 19ed640..994d527 100644\n--- a/builtin/clone.c\n+++ b/builtin/clone.c\n@@ -8,7 +8,7 @@\n  * Clone a repository into a different directory that does not yet exist.\n  */\n \n-#include \"cache.h\"\n+#include \"builtin.h\"\n #include \"parse-options.h\"\n #include \"fetch-pack.h\"\n #include \"refs.h\"\n@@ -16,7 +16,6 @@\n #include \"tree-walk.h\"\n #include \"unpack-trees.h\"\n #include \"transport.h\"\n-#include \"strbuf.h\"\n #include \"dir.h\"\n #include \"pack-refs.h\"\n #include \"sigchain.h\"\ndiff --git a/builtin/fetch-pack.c b/builtin/fetch-pack.c\nindex dbd8b7b..fd70b4c 100644\n--- a/builtin/fetch-pack.c\n+++ b/builtin/fetch-pack.c\n@@ -1,4 +1,4 @@\n-#include \"cache.h\"\n+#include \"builtin.h\"\n #include \"refs.h\"\n #include \"pkt-line.h\"\n #include \"commit.h\"\ndiff --git a/builtin/hash-object.c b/builtin/hash-object.c\nindex 080af1a..8a5670f 100644\n--- a/builtin/hash-object.c\n+++ b/builtin/hash-object.c\n@@ -4,7 +4,7 @@\n  * Copyright (C) Linus Torvalds, 2005\n  * Copyright (C) Junio C Hamano, 2005\n  */\n-#include \"cache.h\"\n+#include \"builtin.h\"\n #include \"blob.h\"\n #include \"quote.h\"\n #include \"parse-options.h\"\ndiff --git a/builtin/index-pack.c b/builtin/index-pack.c\nindex 8dc5c0b..8d1af06 100644\n--- a/builtin/index-pack.c\n+++ b/builtin/index-pack.c\n@@ -1,4 +1,4 @@\n-#include \"cache.h\"\n+#include \"builtin.h\"\n #include \"delta.h\"\n #include \"pack.h\"\n #include \"csum-file.h\"\ndiff --git a/builtin/merge-index.c b/builtin/merge-index.c\nindex 2c4cf5e..adc2a6d 100644\n--- a/builtin/merge-index.c\n+++ b/builtin/merge-index.c\n@@ -1,4 +1,4 @@\n-#include \"cache.h\"\n+#include \"builtin.h\"\n #include \"run-command.h\"\n #include \"exec_cmd.h\"\n \ndiff --git a/builtin/merge-recursive.c b/builtin/merge-recursive.c\nindex c33091b..3a64f5d 100644\n--- a/builtin/merge-recursive.c\n+++ b/builtin/merge-recursive.c\n@@ -1,4 +1,4 @@\n-#include \"cache.h\"\n+#include \"builtin.h\"\n #include \"commit.h\"\n #include \"tag.h\"\n #include \"merge-recursive.h\"\ndiff --git a/builtin/merge-tree.c b/builtin/merge-tree.c\nindex 9b25ddc..1991742 100644\n--- a/builtin/merge-tree.c\n+++ b/builtin/merge-tree.c\n@@ -1,4 +1,4 @@\n-#include \"cache.h\"\n+#include \"builtin.h\"\n #include \"tree-walk.h\"\n #include \"xdiff-interface.h\"\n #include \"blob.h\"\ndiff --git a/builtin/mktag.c b/builtin/mktag.c\nindex 1cb0f3f..9148cc0 100644\n--- a/builtin/mktag.c\n+++ b/builtin/mktag.c\n@@ -1,4 +1,4 @@\n-#include \"cache.h\"\n+#include \"builtin.h\"\n #include \"tag.h\"\n #include \"exec_cmd.h\"\n \ndiff --git a/builtin/pack-redundant.c b/builtin/pack-redundant.c\nindex 41e1615..a15e366 100644\n--- a/builtin/pack-redundant.c\n+++ b/builtin/pack-redundant.c\n@@ -6,7 +6,7 @@\n *\n */\n \n-#include \"cache.h\"\n+#include \"builtin.h\"\n #include \"exec_cmd.h\"\n \n #define BLKSIZE 512\ndiff --git a/builtin/pack-refs.c b/builtin/pack-refs.c\nindex 091860b..39a9d89 100644\n--- a/builtin/pack-refs.c\n+++ b/builtin/pack-refs.c\n@@ -1,4 +1,4 @@\n-#include \"cache.h\"\n+#include \"builtin.h\"\n #include \"parse-options.h\"\n #include \"pack-refs.h\"\n \ndiff --git a/builtin/patch-id.c b/builtin/patch-id.c\nindex 5125300..33e9725 100644\n--- a/builtin/patch-id.c\n+++ b/builtin/patch-id.c\n@@ -1,4 +1,4 @@\n-#include \"cache.h\"\n+#include \"builtin.h\"\n #include \"exec_cmd.h\"\n \n static void flush_current_id(int patchlen, unsigned char *id, git_SHA_CTX *c)\ndiff --git a/builtin/receive-pack.c b/builtin/receive-pack.c\nindex 760817d..f64b79c 100644\n--- a/builtin/receive-pack.c\n+++ b/builtin/receive-pack.c\n@@ -1,4 +1,4 @@\n-#include \"cache.h\"\n+#include \"builtin.h\"\n #include \"pack.h\"\n #include \"refs.h\"\n #include \"pkt-line.h\"\ndiff --git a/builtin/remote.c b/builtin/remote.c\nindex e9a6e09..37c3595 100644\n--- a/builtin/remote.c\n+++ b/builtin/remote.c\n@@ -1,9 +1,8 @@\n-#include \"cache.h\"\n+#include \"builtin.h\"\n #include \"parse-options.h\"\n #include \"transport.h\"\n #include \"remote.h\"\n #include \"string-list.h\"\n-#include \"strbuf.h\"\n #include \"run-command.h\"\n #include \"refs.h\"\n \ndiff --git a/builtin/reset.c b/builtin/reset.c\nindex 0037be4..c198b8e 100644\n--- a/builtin/reset.c\n+++ b/builtin/reset.c\n@@ -7,7 +7,7 @@\n  *\n  * Copyright (c) 2005, 2006 Linus Torvalds and Junio C Hamano\n  */\n-#include \"cache.h\"\n+#include \"builtin.h\"\n #include \"tag.h\"\n #include \"object.h\"\n #include \"commit.h\"\ndiff --git a/builtin/send-pack.c b/builtin/send-pack.c\nindex 481602d..a55a517 100644\n--- a/builtin/send-pack.c\n+++ b/builtin/send-pack.c\n@@ -1,4 +1,4 @@\n-#include \"cache.h\"\n+#include \"builtin.h\"\n #include \"commit.h\"\n #include \"refs.h\"\n #include \"pkt-line.h\"\ndiff --git a/builtin/unpack-file.c b/builtin/unpack-file.c\nindex 608590a..c905d80 100644\n--- a/builtin/unpack-file.c\n+++ b/builtin/unpack-file.c\n@@ -1,4 +1,4 @@\n-#include \"cache.h\"\n+#include \"builtin.h\"\n #include \"blob.h\"\n #include \"exec_cmd.h\"\n \ndiff --git a/builtin/var.c b/builtin/var.c\nindex 0744bb8..1787771 100644\n--- a/builtin/var.c\n+++ b/builtin/var.c\n@@ -3,7 +3,7 @@\n  *\n  * Copyright (C) Eric Biederman, 2005\n  */\n-#include \"cache.h\"\n+#include \"builtin.h\"\n #include \"exec_cmd.h\"\n \n static const char var_usage[] = \"git var (-l | <variable>)\";\ndiff --git a/wt-status.c b/wt-status.c\nindex fc2438f..bfc97fb 100644\n--- a/wt-status.c\n+++ b/wt-status.c\n@@ -1,4 +1,4 @@\n-#include \"cache.h\"\n+#include \"builtin.h\"\n #include \"wt-status.h\"\n #include \"object.h\"\n #include \"dir.h\"\n-- \n1.7.2.3\n"},{"id":"155851","messageId":"AANLkTi=SbqD_3yYsRGCsmSxh-B8kpupnjq0XPGjMsxdK@mail.gmail.com","threadId":"25743","inReplyTo":"1289745857-16704-5-git-send-email-avarab@gmail.com","subject":"Re: [PATCH 4/4] builtin: use builtin.h for all builtin commands","fromName":"Sverre Rabbelier","fromEmail":"srabbelier@gmail.com","sentAt":"2010-11-14T15:01:10Z","receivedAt":"2010-11-14T15:01:10Z","isPatch":true,"sender":{"key":"srabbelier@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3098?v=4"},"body":"Heya,\n\nOn Sun, Nov 14, 2010 at 15:44, Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:\n> diff --git a/wt-status.c b/wt-status.c\n> index fc2438f..bfc97fb 100644\n> --- a/wt-status.c\n> +++ b/wt-status.c\n> @@ -1,4 +1,4 @@\n> -#include \"cache.h\"\n> +#include \"builtin.h\"\n\nDoesn't this suggest wt-status.c should be moved to builtin? Or\nsomething like that.\n\n-- \nCheers,\n\nSverre Rabbelier\n"},{"id":"155855","messageId":"AANLkTimhrEAgOwfHb07vaR-QxWW6PicRWgiP8BBtP+_E@mail.gmail.com","threadId":"25743","inReplyTo":"AANLkTi=SbqD_3yYsRGCsmSxh-B8kpupnjq0XPGjMsxdK@mail.gmail.com","subject":"Re: [PATCH 4/4] builtin: use builtin.h for all builtin commands","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-11-14T15:11:41Z","receivedAt":"2010-11-14T15:11:41Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Sun, Nov 14, 2010 at 16:01, Sverre Rabbelier <srabbelier@gmail.com> wrote:\n> On Sun, Nov 14, 2010 at 15:44, Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:\n>> diff --git a/wt-status.c b/wt-status.c\n>> index fc2438f..bfc97fb 100644\n>> --- a/wt-status.c\n>> +++ b/wt-status.c\n>> @@ -1,4 +1,4 @@\n>> -#include \"cache.h\"\n>> +#include \"builtin.h\"\n>\n> Doesn't this suggest wt-status.c should be moved to builtin? Or\n> something like that.\n\nIt just suggests that the header was useful. But maybe it should be\nmoved to buildin/status.c.\n"},{"id":"155857","messageId":"20101114172331.GA26459@burratino","threadId":"25743","inReplyTo":"1289745857-16704-2-git-send-email-avarab@gmail.com","subject":"Re: [PATCH 1/4] Makefile: move \"Platform specific tweaks\" above LIB_{H,OBJS}","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-11-14T17:23:31Z","receivedAt":"2010-11-14T17:23:31Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Ævar Arnfjörð Bjarmason wrote:\n\n> Change the Makefile so that the \"Platform specific tweaks\" section\n> comes before the assignments to LIB_H and LIB_OBJS.\n\nCurrently the Makefile is structured like this:\n\n\tA. default target\n\tB. basics\n\t   1. basic configuration section\n\t      a. -include GIT-VERSION-FILE and recipe to generate it\n\t      b. uname_S := $(shell uname -s) and similar variables\n\t      c. user-facing compilation variables: CFLAGS, LDFLAGS, STRIP\n\t      d. user-facing paths: prefix, bindir_relative, etc\n\t      e. program names: CC, AR, etc\n\t   2. basic cflags and ldflags (almost configurable)\n\t   3. main list of program targets:\n\t      SCRIPTS, PROGRAMS, TEST_PROGRAMS, BUILT_INS,\n\t      OTHER_PROGRAMS, BINDIR_PROGRAMS\n\t   4. defaults for SHELL_PATH, PERL_PATH, PYTHON_PATH\n\t   5. main list of library targets:\n\t      LIB_FILE, XDIFF_LIB, LIB_H, LIB_OBJS, BUILTIN_OBJS\n\t   6. GITLIBS, EXTLIBS for the linker command line\n\t   7. platform-specific tweaks\n\t   8. -include config.mak, config.mak.autogen\n\tC. preparations\n\t   1. handling of the various NO_THIS_OR_THAT options.\n\t      This affects BASIC_CFLAGS, COMPAT_CFLAGS,\n\t      COMPAT_OBJS, PROGRAMS, EXTLIBS, LIB_OBJ, LIB_H, etc\n\t   2. machinery for non-noisy build\n\t   3. shell-quoted and C-quoted variables\n\t   4. ALL_CFLAGS, ALL_LDFLAGS\n\tD. main build rules\n\t   1. all:: targets for the main build, subdirs\n\t   2. shell sanity check\n\t   3. building the git binary and built-ins\n\t   4. scripts and gitweb\n\t   5. autoconf\n\t   6. building objects:\n\t      a. %.o: %.c rule, header deps, dependency checking\n\t      b. target-specific -D flags\n\t   7. building non-builtins, remote-curl\n\t   8. libs\n\t   9. subdirs\n\tE. GIT-CFLAGS, GIT-BUILD-OPTIONS, GIT-GUI-VARS\n\tF. bin-wrappers\n\tG. tests\n\tH. installation rules\n\tI. maintainer's dist rules, check-doc, coverage, etc\n\nThis patch proposes moving A5 (main list of library targets) after\nA8 (end of configuration).\n\n> In the ab/i18n series I only want to build gettext.o (by adding it to\n> LIB_OBJS) if NO_GETTEXT is unset. It's not possible to do that without\n> an ugly hack if we haven't applied our platform specific tweaks before\n> LIB_{H,OBJS} gets assigned to.\n> \n> See <201008140002.40587.j6t@kdbg.org> (subject: \"[PATCH] Do not build\n> i18n on Windows.\") for Johannes's original report, and my follow-up in\n> <AANLkTiku5R+idX-C8f0AcCikBLmfEb5ZEhdft+CSRzU0@mail.gmail.com> where I\n> suggested that the problem be solved in the manner of this patch.\n\nThis doesn't motivate the patch all all to me.  Is changing the list\nof LIB_OBJS in section C1 really an ugly hack?  It is where\nconfiguration-specific things go and how BLK_SHA1, PROGRAM_OBJS, etc\nwork already.\n\nThat said, I can see another reason to move A3 and A5 lower down in\nthe makefile.  Namely, they don't seem to have anything obvious to\ndo with configuration.  Including the basic list of objects that\nhigh up may make the makefile easier to read straight through, but\nI don't think anyone is reading it straight through.\n\nSo I wouldn't have anything against moving both A3 and A5 to right\nbefore C1, I just think it needs different motivation.\n\nSensible?\nJonathan\n"},{"id":"155858","messageId":"20101114173241.GB26459@burratino","threadId":"25743","inReplyTo":"1289745857-16704-3-git-send-email-avarab@gmail.com","subject":"Re: [PATCH 2/4] t7004-tag.sh: re-arrange git tag comment for clarity","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-11-14T17:32:41Z","receivedAt":"2010-11-14T17:32:41Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Ævar Arnfjörð Bjarmason wrote:\n\n>                           I used ! instead of test_must_fail so that\n> the GIT_EDITOR variable was only used in this command invocation,\n\n\t(\n\t\tGIT_EDITOR=cat &&\n\t\texport GIT_EDITOR &&\n\t\ttest_must_fail ...\n\t)\n\n?\n\n>                                                                   and\n> because the surrounding tests use this style.\n\nOh, okay.  I had the test_must_fail version sitting in my local tree\nas part of the unsent part of the &&-chaining series\nhttp://thread.gmane.org/gmane.comp.version-control.git/157903/focus=160419\n\nI am happy to see this fixed sooner.\n\n[...]\n> +test_expect_success \\\n> +\t'message in editor has initial comment: first line' '\n>  \t# check the first line --- should be empty\n> -\tfirst=$(sed -e 1q <actual) &&\n> -\ttest -z \"$first\" &&\n> +\techo >first.expect &&\n> +\tsed -e 1q <actual >first.actual &&\n> +\ttest_cmp first.expect first.actual\n> +'\n> +\n> +test_expect_success \\\n> +\t'message in editor has initial comment: remainder' '\n>  \t# remove commented lines from the remainder -- should be empty\n> -\trest=$(sed -e 1d -e '/^#/d' <actual) &&\n> -\ttest -z \"$rest\"\n> +\t>rest.expect\n> +\tsed -e 1d -e '/^#/d' <actual >rest.actual &&\n> +\ttest_cmp rest.expect rest.actual\n>  '\n\nNice.  Note that you've changed the semantics of the test here\n(probably for the better): the $() backquoting operator strips\ntrailing newlines, while your sed expression does not.\n\nI assume you've run the tests and made sure they still pass.\n\nFor what it's worth,\nReviewed-by: Jonathan Nieder <jrnieder@gmail.com>\n"},{"id":"155860","messageId":"20101114174133.GD26459@burratino","threadId":"25743","inReplyTo":"1289745857-16704-4-git-send-email-avarab@gmail.com","subject":"Re: [PATCH 3/4] tests: use test_cmp instead of piping to diff(1)","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-11-14T17:41:33Z","receivedAt":"2010-11-14T17:41:33Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Ævar Arnfjörð Bjarmason wrote:\n\n> --- a/t/t4041-diff-submodule-option.sh\n> +++ b/t/t4041-diff-submodule-option.sh\n> @@ -37,9 +37,10 @@ head1=$(add_file sm1 foo1 foo2)\n>  test_expect_success 'added submodule' \"\n>  \tgit add sm1 &&\n>  \tgit diff-index -p --submodule=log HEAD >actual &&\n> -\tdiff actual - <<-EOF\n> +\tcat >expected <<-EOF &&\n>  Submodule sm1 0000000...$head1 (new submodule)\n>  EOF\n> +\ttest_cmp expected actual\n>  \"\n\nNice.  Reminds me of\nhttp://thread.gmane.org/gmane.comp.version-control.git/160168/focus=160222\n(use of \"cmp - foo.expect\" in git svn tests); anyone want to take a\nstab at fixing that, too?\n\n> --- a/t/t7401-submodule-summary.sh\n> +++ b/t/t7401-submodule-summary.sh\n[...]\n>  test_expect_success '--for-status' \"\n>      git submodule summary --for-status HEAD^ >actual &&\n> -    test_cmp actual - <<EOF\n> +\ttest_cmp actual - <<EOF\n\nI think this tab should be spaces?  Also, shouldn't this be\n\n\tcat >expect <<EOF &&\n\t...\n\tEOF\n\ttest_cmp expect actual\n\nto match the others?  There are a few similar cases in the patch.\n\nI assume you've checked the patched tests still pass.  So with the exception\njust mentioned,\nReviewed-by: Jonathan Nieder <jrnieder@gmail.com>\n\nThanks.\n"},{"id":"155861","messageId":"20101114174751.GE26459@burratino","threadId":"25743","inReplyTo":"1289745857-16704-5-git-send-email-avarab@gmail.com","subject":"Re: [PATCH 4/4] builtin: use builtin.h for all builtin commands","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-11-14T17:47:51Z","receivedAt":"2010-11-14T17:47:51Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Ævar Arnfjörð Bjarmason wrote:\n\n> This impeded my efforts to gettextize git, since I'd otherwise have to\n> add gettext.h to all of these. Using builtin.h is a good idea in any\n> case, since it's defining the prototypes for the cmd_* functions that\n> these files define.\n\nYes, I think Junio acked this before, though I can't it in the archive.\n\nAlso compare: http://thread.gmane.org/gmane.comp.version-control.git/49523\n\n> --- a/wt-status.c\n> +++ b/wt-status.c\n> @@ -1,4 +1,4 @@\n> -#include \"cache.h\"\n> +#include \"builtin.h\"\n>  #include \"wt-status.h\"\n>  #include \"object.h\"\n>  #include \"dir.h\"\n\nIMHO this deserves a separate mention in the log message.  If it is\njust to get gettext.h, why not include gettext.h directly?\n"},{"id":"155862","messageId":"20101114175010.GF26459@burratino","threadId":"25743","inReplyTo":"1289745857-16704-1-git-send-email-avarab@gmail.com","subject":"Re: [PATCH 0/4] [PULL] ab/i18n-prereqs, prerequisites for ab/i18n","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-11-14T17:50:11Z","receivedAt":"2010-11-14T17:50:11Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Ævar Arnfjörð Bjarmason wrote:\n\n> These are the first four patches in the ab/i18n series which aren't\n> strictly related to it, but merely fixes to issues I encountered.\n> \n> I'm submitting these separately now in the hope that they'll make it\n> to the next & master branches before ab/i18n. Having these separately\n> reviewed should be easier for everyone.\n\nThank you!  Hopefully others can pitch in and extract more patches\nlike this from ab/i18n.\n\nI've sent comments on all four patches.  I agree with the spirit\nof all of them and would be happy to see them tweaked and integrated\nsoon (patch 2 does not even seem to need tweaking).\n"},{"id":"155863","messageId":"AANLkTinaDhXQjPC6s1eFb8HwEReW7P-ObmwRn2Hpb=O4@mail.gmail.com","threadId":"25743","inReplyTo":"20101114172331.GA26459@burratino","subject":"Re: [PATCH 1/4] Makefile: move \"Platform specific tweaks\" above LIB_{H,OBJS}","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-11-14T17:51:26Z","receivedAt":"2010-11-14T17:51:26Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Sun, Nov 14, 2010 at 18:23, Jonathan Nieder <jrnieder@gmail.com> wrote:\n> Ævar Arnfjörð Bjarmason wrote:\n>\n>> Change the Makefile so that the \"Platform specific tweaks\" section\n>> comes before the assignments to LIB_H and LIB_OBJS.\n>\n> Currently the Makefile is structured like this:\n>\n>        A. default target\n>        B. basics\n>           1. basic configuration section\n>              a. -include GIT-VERSION-FILE and recipe to generate it\n>              b. uname_S := $(shell uname -s) and similar variables\n>              c. user-facing compilation variables: CFLAGS, LDFLAGS, STRIP\n>              d. user-facing paths: prefix, bindir_relative, etc\n>              e. program names: CC, AR, etc\n>           2. basic cflags and ldflags (almost configurable)\n>           3. main list of program targets:\n>              SCRIPTS, PROGRAMS, TEST_PROGRAMS, BUILT_INS,\n>              OTHER_PROGRAMS, BINDIR_PROGRAMS\n>           4. defaults for SHELL_PATH, PERL_PATH, PYTHON_PATH\n>           5. main list of library targets:\n>              LIB_FILE, XDIFF_LIB, LIB_H, LIB_OBJS, BUILTIN_OBJS\n>           6. GITLIBS, EXTLIBS for the linker command line\n>           7. platform-specific tweaks\n>           8. -include config.mak, config.mak.autogen\n>        C. preparations\n>           1. handling of the various NO_THIS_OR_THAT options.\n>              This affects BASIC_CFLAGS, COMPAT_CFLAGS,\n>              COMPAT_OBJS, PROGRAMS, EXTLIBS, LIB_OBJ, LIB_H, etc\n>           2. machinery for non-noisy build\n>           3. shell-quoted and C-quoted variables\n>           4. ALL_CFLAGS, ALL_LDFLAGS\n>        D. main build rules\n>           1. all:: targets for the main build, subdirs\n>           2. shell sanity check\n>           3. building the git binary and built-ins\n>           4. scripts and gitweb\n>           5. autoconf\n>           6. building objects:\n>              a. %.o: %.c rule, header deps, dependency checking\n>              b. target-specific -D flags\n>           7. building non-builtins, remote-curl\n>           8. libs\n>           9. subdirs\n>        E. GIT-CFLAGS, GIT-BUILD-OPTIONS, GIT-GUI-VARS\n>        F. bin-wrappers\n>        G. tests\n>        H. installation rules\n>        I. maintainer's dist rules, check-doc, coverage, etc\n\nThat listing should be in a comment at the start of the\nMakefile. Please submit a patch for that!\n\n> This patch proposes moving A5 (main list of library targets) after\n> A8 (end of configuration).\n\nRight. Thanks for the helpful outline.\n\n>> In the ab/i18n series I only want to build gettext.o (by adding it to\n>> LIB_OBJS) if NO_GETTEXT is unset. It's not possible to do that without\n>> an ugly hack if we haven't applied our platform specific tweaks before\n>> LIB_{H,OBJS} gets assigned to.\n>>\n>> See <201008140002.40587.j6t@kdbg.org> (subject: \"[PATCH] Do not build\n>> i18n on Windows.\") for Johannes's original report, and my follow-up in\n>> <AANLkTiku5R+idX-C8f0AcCikBLmfEb5ZEhdft+CSRzU0@mail.gmail.com> where I\n>> suggested that the problem be solved in the manner of this patch.\n>\n> This doesn't motivate the patch all all to me.  Is changing the list\n> of LIB_OBJS in section C1 really an ugly hack?  It is where\n> configuration-specific things go and how BLK_SHA1, PROGRAM_OBJS, etc\n> work already.\n\nYeah, because if it hadn't come before A8 it would have been *not*\nassigned to in the first place like we do everywhere else. Moving A8\nbefore A5 enables us to do that.\n\n> That said, I can see another reason to move A3 and A5 lower down in\n> the makefile.  Namely, they don't seem to have anything obvious to\n> do with configuration.  Including the basic list of objects that\n> high up may make the makefile easier to read straight through, but\n> I don't think anyone is reading it straight through.\n>\n> So I wouldn't have anything against moving both A3 and A5 to right\n> before C1, I just think it needs different motivation.\n\nI was thinking about moving A3 & A5 further down. But since I just\nneeded A5 now I only ended up doing that. Moving them both would clean\nthings up though. I think we should do A8 as early as possible.\n"},{"id":"155864","messageId":"20101114175328.GG26459@burratino","threadId":"25743","inReplyTo":"20101114172331.GA26459@burratino","subject":"Re: [PATCH 1/4] Makefile: move \"Platform specific tweaks\" above LIB_{H,OBJS}","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-11-14T17:53:28Z","receivedAt":"2010-11-14T17:53:28Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Jonathan Nieder wrote:\n> Ævar Arnfjörð Bjarmason wrote:\n\n>> In the ab/i18n series I only want to build gettext.o (by adding it to\n>> LIB_OBJS) if NO_GETTEXT is unset. It's not possible to do that without\n>> an ugly hack if we haven't applied our platform specific tweaks before\n>> LIB_{H,OBJS} gets assigned to.\n>> \n>> See <201008140002.40587.j6t@kdbg.org> (subject: \"[PATCH] Do not build\n>> i18n on Windows.\") for Johannes's original report, and my follow-up in\n>> <AANLkTiku5R+idX-C8f0AcCikBLmfEb5ZEhdft+CSRzU0@mail.gmail.com> where I\n>> suggested that the problem be solved in the manner of this patch.\n>\n> This doesn't motivate the patch all all to me.\n\nErm, sorry for the gibberish.  For \"all all\", please read \"at all\"\nor \"clearly enough\".\n\nJonathan\nwho ought to slow down his replies; please feel free to point\nout when I send nonsense like this so I can see when the rate-limiting\nis working :)\n"},{"id":"155865","messageId":"AANLkTik7E6B0oLnSjqw05NhhbSrz51k+O272iFjr1swk@mail.gmail.com","threadId":"25743","inReplyTo":"20101114173241.GB26459@burratino","subject":"Re: [PATCH 2/4] t7004-tag.sh: re-arrange git tag comment for clarity","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-11-14T17:57:03Z","receivedAt":"2010-11-14T17:57:03Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Sun, Nov 14, 2010 at 18:32, Jonathan Nieder <jrnieder@gmail.com> wrote:\n> Ævar Arnfjörð Bjarmason wrote:\n>\n>>                           I used ! instead of test_must_fail so that\n>> the GIT_EDITOR variable was only used in this command invocation,\n>\n>        (\n>                GIT_EDITOR=cat &&\n>                export GIT_EDITOR &&\n>                test_must_fail ...\n>        )\n>\n> ?\n>\n>>                                                                   and\n>> because the surrounding tests use this style.\n>\n> Oh, okay.  I had the test_must_fail version sitting in my local tree\n> as part of the unsent part of the &&-chaining series\n> http://thread.gmane.org/gmane.comp.version-control.git/157903/focus=160419\n>\n> I am happy to see this fixed sooner.\n\nBetter to fix it up later IMO in something like your series. One\nsurgery at a time.\n\n> [...]\n>> +test_expect_success \\\n>> +     'message in editor has initial comment: first line' '\n>>       # check the first line --- should be empty\n>> -     first=$(sed -e 1q <actual) &&\n>> -     test -z \"$first\" &&\n>> +     echo >first.expect &&\n>> +     sed -e 1q <actual >first.actual &&\n>> +     test_cmp first.expect first.actual\n>> +'\n>> +\n>> +test_expect_success \\\n>> +     'message in editor has initial comment: remainder' '\n>>       # remove commented lines from the remainder -- should be empty\n>> -     rest=$(sed -e 1d -e '/^#/d' <actual) &&\n>> -     test -z \"$rest\"\n>> +     >rest.expect\n>> +     sed -e 1d -e '/^#/d' <actual >rest.actual &&\n>> +     test_cmp rest.expect rest.actual\n>>  '\n>\n> Nice.  Note that you've changed the semantics of the test here\n> (probably for the better): the $() backquoting operator strips\n> trailing newlines, while your sed expression does not.\n>\n> I assume you've run the tests and made sure they still pass.\n\nYeah, I've been running all these (also the others in the series) for\nmonths on several different platforms with different options. They all\nwork.\n\n> For what it's worth,\n> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>\n\nThanks.\n"},{"id":"155867","messageId":"20101114185130.GA18385@burratino","threadId":"25743","inReplyTo":"AANLkTinaDhXQjPC6s1eFb8HwEReW7P-ObmwRn2Hpb=O4@mail.gmail.com","subject":"Re: [PATCH 1/4] Makefile: move \"Platform specific tweaks\" above LIB_{H,OBJS}","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-11-14T18:51:30Z","receivedAt":"2010-11-14T18:51:30Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Ævar Arnfjörð Bjarmason wrote:\n\n> That listing should be in a comment at the start of the\n> Makefile. Please submit a patch for that!\n\nHow about this?  An annoying piece of GNU makefile syntax makes this\nuglier than it needs to be (search for HACK for details).\n\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\n---\ndiff --git a/Makefile b/Makefile\nindex 1f1ce04..38edd65 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -1,6 +1,8 @@\n # The default target of this Makefile is...\n all::\n \n+outline:: ; @echo \"Configuration.\"\n+\n # Define V=1 to have a more verbose compile.\n #\n # Define SHELL_PATH to a POSIX shell if your /bin/sh is broken.\n@@ -238,6 +240,12 @@ all::\n #\n # Define NATIVE_CRLF if your platform uses CRLF for line endings.\n \n+outline::\n+\t@echo \" Basic configuration section.\"\n+\t@echo \"  -include GIT-VERSION-FILE and recipe to generate it.\"\n+\t@echo \"  uname_S and similar variables.\"\n+\t@echo \"  user-facing compilation variables: CFLAGS, LDFLAGS, STRIP\"\n+\n GIT-VERSION-FILE: FORCE\n \t@$(SHELL_PATH) ./GIT-VERSION-GEN\n -include GIT-VERSION-FILE\n@@ -263,6 +271,7 @@ ALL_CFLAGS = $(CPPFLAGS) $(CFLAGS)\n ALL_LDFLAGS = $(LDFLAGS)\n STRIP ?= strip\n \n+outline:: ; @echo \"  User-facing paths: prefix, bindir_relative, etc.\"\n # Among the variables below, these:\n #   gitexecdir\n #   template_dir\n@@ -301,6 +310,7 @@ pathsep = :\n \n export prefix bindir sharedir sysconfdir gitwebdir\n \n+outline:: ; @echo \"  Program names: CC, AR, etc.\"\n CC = gcc\n AR = ar\n RM = rm -f\n@@ -325,6 +335,7 @@ SPARSE_FLAGS = -D__BIG_ENDIAN__ -D__powerpc__\n \n ### --- END CONFIGURATION SECTION ---\n \n+outline:: ; @echo \" Basic cflags and ldflags (almost configurable)\"\n # Those must not be GNU-specific; they are shared with perl/ which may\n # be built by a different compiler. (Note that this is an artifact now\n # but it still might be nice to keep that distinction.)\n@@ -353,6 +364,11 @@ TEST_PROGRAMS_NEED_X =\n # interactive shell sessions without exporting it.\n unexport CDPATH\n \n+outline::\n+\t@echo \" Main list of program targets:\"\n+\t@echo \"  SCRIPTS, PROGRAMS, TEST_PROGRAMS, BUILT_INS,\"\n+\t@echo \"  OTHER_PROGRAMS, BINDIR_PROGRAMS\"\n+\n SCRIPT_SH += git-am.sh\n SCRIPT_SH += git-bisect.sh\n SCRIPT_SH += git-difftool--helper.sh\n@@ -465,6 +481,10 @@ BINDIR_PROGRAMS_NEED_X += git-shell\n \n BINDIR_PROGRAMS_NO_X += git-cvsserver\n \n+outline:: ; @echo \" Defaults for SHELL_PATH, PERL_PATH, PYTHON_PATH\"\n+# HACK: end of outline recipe\n+reset =\n+\n # Set paths to tools early so that they can be used for version tests.\n ifndef SHELL_PATH\n \tSHELL_PATH = /bin/sh\n@@ -479,6 +499,9 @@ endif\n export PERL_PATH\n export PYTHON_PATH\n \n+outline::\n+\t@echo \" Main list of library targets:\"\n+\t@echo \"  LIB_FILE, XDIFF_LIB, LIB_H, LIB_OBJS, BUILTIN_OBJS\"\n LIB_FILE=libgit.a\n XDIFF_LIB=xdiff/lib.a\n VCSSVN_LIB=vcs-svn/lib.a\n@@ -758,9 +781,12 @@ GITLIBS = $(LIB_FILE) $(XDIFF_LIB)\n EXTLIBS =\n \n #\n-# Platform specific tweaks\n+outline:: ; @echo \" Platform specific tweaks\"\n #\n \n+# HACK: end of outline recipe\n+reset =\n+\n # We choose to avoid \"if .. else if .. else .. endif endif\"\n # because maintaining the nesting to match is a pain.  If\n # we had \"elif\" things would have been much nicer...\n@@ -1147,9 +1173,14 @@ else\n endif\n endif\n \n+outline:: ; @echo \" -include config.mak and config.mak.autogen\"\n -include config.mak.autogen\n -include config.mak\n \n+#\n+outline:: ; @echo \"Preparations\"\n+#\n+\n ifdef CHECK_HEADER_DEPENDENCIES\n COMPUTE_HEADER_DEPENDENCIES =\n USE_COMPUTED_HEADER_DEPENDENCIES =\n@@ -1159,6 +1190,12 @@ ifdef COMPUTE_HEADER_DEPENDENCIES\n USE_COMPUTED_HEADER_DEPENDENCIES = YesPlease\n endif\n \n+outline::\n+\t@echo \" Handling of the various NO_THIS_OR_THAT options\"\n+\t@echo \"  This affects BASIC_CFLAGS, COMPAT_CFLAGS,\"\n+\t@echo \"  COMPAT_OBJS, PROGRAMS, EXTLIBS, LIB_OBJ, LIB_H, etc\"\n+reset =\n+\n ifdef SANE_TOOL_PATH\n SANE_TOOL_PATH_SQ = $(subst ','\\'',$(SANE_TOOL_PATH))\n BROKEN_PATH_FIX = 's|^\\# @@BROKEN_PATH_FIX@@$$|git_broken_path_fix $(SANE_TOOL_PATH_SQ)|'\n@@ -1491,6 +1528,7 @@ ifeq ($(PYTHON_PATH),)\n NO_PYTHON=NoThanks\n endif\n \n+outline:: ; @echo \" Machinery for non-noisy build\"\n QUIET_SUBDIR0  = +$(MAKE) -C # space to separate -C and subdir\n QUIET_SUBDIR1  =\n \n@@ -1522,7 +1560,8 @@ ifdef ASCIIDOC8\n \texport ASCIIDOC8\n endif\n \n-# Shell quote (do not use $(call) to accommodate ancient setups);\n+outline:: ; @echo \" Shell-quoted and C-quoted variables\"\n+# Do not use $(call) to accommodate ancient setups.\n \n SHA1_HEADER_SQ = $(subst ','\\'',$(SHA1_HEADER))\n ETC_GITCONFIG_SQ = $(subst ','\\'',$(ETC_GITCONFIG))\n@@ -1545,12 +1584,6 @@ PYTHON_PATH_SQ = $(subst ','\\'',$(PYTHON_PATH))\n TCLTK_PATH_SQ = $(subst ','\\'',$(TCLTK_PATH))\n DIFF_SQ = $(subst ','\\'',$(DIFF))\n \n-LIBS = $(GITLIBS) $(EXTLIBS)\n-\n-BASIC_CFLAGS += -DSHA1_HEADER='$(SHA1_HEADER_SQ)' \\\n-\t$(COMPAT_CFLAGS)\n-LIB_OBJS += $(COMPAT_OBJS)\n-\n # Quote for C\n \n ifdef DEFAULT_EDITOR\n@@ -1567,16 +1600,25 @@ DEFAULT_PAGER_CQ_SQ = $(subst ','\\'',$(DEFAULT_PAGER_CQ))\n BASIC_CFLAGS += -DDEFAULT_PAGER='$(DEFAULT_PAGER_CQ_SQ)'\n endif\n \n+outline:: ; @echo \" ALL_CFLAGS, ALL_LDFLAGS\"\n+LIBS = $(GITLIBS) $(EXTLIBS)\n+\n+BASIC_CFLAGS += -DSHA1_HEADER='$(SHA1_HEADER_SQ)' \\\n+\t$(COMPAT_CFLAGS)\n+LIB_OBJS += $(COMPAT_OBJS)\n+\n ALL_CFLAGS += $(BASIC_CFLAGS)\n ALL_LDFLAGS += $(BASIC_LDFLAGS)\n \n export DIFF TAR INSTALL DESTDIR SHELL_PATH\n \n-\n-### Build rules\n+#\n+outline:: ; @echo \"Main build rules\"\n+#\n \n SHELL = $(SHELL_PATH)\n \n+outline:: ; @echo \" all:: targets for the main build, subdirs\"\n all:: shell_compatibility_test $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) $(OTHER_PROGRAMS) GIT-BUILD-OPTIONS\n ifneq (,$X)\n \t$(QUIET_BUILT_IN)$(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) git$X)), test -d '$p' -o '$p' -ef '$p$X' || $(RM) '$p';)\n@@ -1598,11 +1640,13 @@ endif\n please_set_SHELL_PATH_to_a_more_modern_shell:\n \t@$$(:)\n \n+outline:: ; @echo \" Shell sanity check\"\n shell_compatibility_test: please_set_SHELL_PATH_to_a_more_modern_shell\n \n strip: $(PROGRAMS) git$X\n \t$(STRIP) $(STRIP_OPTS) $(PROGRAMS) git$X\n \n+outline:: ; @echo \" Git binary and built-ins\"\n git.o: common-cmds.h\n git.s git.o: EXTRA_CPPFLAGS = -DGIT_VERSION='\"$(GIT_VERSION)\"' \\\n \t'-DGIT_HTML_PATH=\"$(htmldir_SQ)\"'\n@@ -1628,6 +1672,7 @@ common-cmds.h: ./generate-cmdlist.sh command-list.txt\n common-cmds.h: $(wildcard Documentation/git-*.txt)\n \t$(QUIET_GEN)./generate-cmdlist.sh > $@+ && mv $@+ $@\n \n+outline:: ; @echo \" Scripts and gitweb\"\n define cmd_munge_script\n $(RM) $@ $@+ && \\\n sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \\\n@@ -1743,6 +1788,7 @@ $(patsubst %.py,%,$(SCRIPT_PYTHON)): % : unimplemented.sh\n \tmv $@+ $@\n endif # NO_PYTHON\n \n+outline:: ; @echo \" Autoconf\"\n configure: configure.ac\n \t$(QUIET_GEN)$(RM) $@ $<+ && \\\n \tsed -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \\\n@@ -1756,6 +1802,10 @@ git.o git.spec \\\n \t$(patsubst %.perl,%,$(SCRIPT_PERL)) \\\n \t: GIT-VERSION-FILE\n \n+outline::\n+\t@echo \" Building objects\"\n+\t@echo \"  %.o: %.c rule, header deps, dependency checking\"\n+\n TEST_OBJS := $(patsubst test-%$X,test-%.o,$(TEST_PROGRAMS))\n GIT_OBJS := $(LIB_OBJS) $(BUILTIN_OBJS) $(PROGRAM_OBJS) $(TEST_OBJS) \\\n \tgit.o\n@@ -1895,6 +1945,7 @@ $(VCSSVN_OBJS): \\\n \tvcs-svn/svndump.h\n endif\n \n+outline:: ; @echo \"  Target-specific -D flags\"\n exec_cmd.s exec_cmd.o: EXTRA_CPPFLAGS = \\\n \t'-DGIT_EXEC_PATH=\"$(gitexecdir_SQ)\"' \\\n \t'-DBINDIR=\"$(bindir_relative_SQ)\"' \\\n@@ -1922,6 +1973,7 @@ compat/nedmalloc/nedmalloc.o: EXTRA_CPPFLAGS = \\\n \t-DNDEBUG -DOVERRIDE_STRDUP -DREPLACE_SYSTEM_ALLOCATOR\n endif\n \n+outline:: ; @echo \" Non-builtin programs, remote-curl\"\n git-%$X: %.o $(GITLIBS)\n \t$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)\n \n@@ -1946,6 +1998,7 @@ $(REMOTE_CURL_PRIMARY): remote-curl.o http.o http-walker.o $(GITLIBS)\n \t$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \\\n \t\t$(LIBS) $(CURL_LIBCURL) $(EXPAT_LIBEXPAT)\n \n+outline:: ; @echo \" Libraries\"\n $(LIB_FILE): $(LIB_OBJS)\n \t$(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(LIB_OBJS)\n \n@@ -1955,6 +2008,7 @@ $(XDIFF_LIB): $(XDIFF_OBJS)\n $(VCSSVN_LIB): $(VCSSVN_OBJS)\n \t$(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(VCSSVN_OBJS)\n \n+outline:: ; @echo \" Subdirs\"\n doc:\n \t$(MAKE) -C Documentation all\n \n@@ -1982,6 +2036,10 @@ cscope:\n \t$(RM) cscope*\n \t$(FIND) . -name '*.[hcS]' -print | xargs cscope -b\n \n+#\n+outline:: ; @echo \"GIT-CFLAGS, GIT-BUILD-OPTIONS, GIT-GUI-VARS\"\n+#\n+\n ### Detect prefix changes\n TRACK_CFLAGS = $(CC):$(subst ','\\'',$(ALL_CFLAGS)):\\\n              $(bindir_SQ):$(gitexecdir_SQ):$(template_dir_SQ):$(prefix_SQ)\n@@ -2024,6 +2082,9 @@ GIT-GUI-VARS: FORCE\n             fi\n endif\n \n+#\n+outline:: ; @echo \"Wrappers for running built git in place\"\n+#\n test_bindir_programs := $(patsubst %,bin-wrappers/%,$(BINDIR_PROGRAMS_NEED_X) $(BINDIR_PROGRAMS_NO_X) $(TEST_PROGRAMS_NEED_X))\n \n all:: $(TEST_PROGRAMS) $(test_bindir_programs)\n@@ -2041,8 +2102,9 @@ bin-wrappers/%: wrap-for-bin.sh\n \n export NO_SVN_TESTS\n \n-### Testing rules\n-\n+#\n+outline:: ; @echo \"Testing rules\"\n+#\n test: all\n \t$(MAKE) -C t/ all\n \n@@ -2083,7 +2145,9 @@ check: common-cmds.h\n remove-dashes:\n \t./fixup-builtins $(BUILT_INS) $(PROGRAMS) $(SCRIPTS)\n \n-### Installation rules\n+#\n+outline:: ; @echo \"Installation rules\"\n+#\n \n ifneq ($(filter /%,$(firstword $(template_dir))),)\n template_instdir = $(template_dir)\n@@ -2183,8 +2247,9 @@ quick-install-html:\n \t$(MAKE) -C Documentation quick-install-html\n \n \n-\n-### Maintainer's dist rules\n+#\n+outline:: ; @echo \"Maintainer's dist rules, check-doc, coverage testing\"\n+#\n \n git.spec: git.spec.in\n \tsed -e 's/@@VERSION@@/$(GIT_VERSION)/g' < $< > $@+\n"},{"id":"155868","messageId":"7v8w0v3fbq.fsf@alter.siamese.dyndns.org","threadId":"25743","inReplyTo":"AANLkTi=SbqD_3yYsRGCsmSxh-B8kpupnjq0XPGjMsxdK@mail.gmail.com","subject":"Re: [PATCH 4/4] builtin: use builtin.h for all builtin commands","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-11-14T18:55:37Z","receivedAt":"2010-11-14T18:55:37Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Sverre Rabbelier <srabbelier@gmail.com> writes:\n\n> On Sun, Nov 14, 2010 at 15:44, Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:\n>> diff --git a/wt-status.c b/wt-status.c\n>> index fc2438f..bfc97fb 100644\n>> --- a/wt-status.c\n>> +++ b/wt-status.c\n>> @@ -1,4 +1,4 @@\n>> -#include \"cache.h\"\n>> +#include \"builtin.h\"\n>\n> Doesn't this suggest wt-status.c should be moved to builtin? Or\n> something like that.\n\nWhy?  builtin.h is to declare cmd_foo() and to be included by files that\nimplement cmd_foo() (i.e. builtin/*.c) and the file that needs to see\ncmd_foo() declarations (i.e. git.c).\n\nwt-status.c is about giving common service routines for status related\ncommands in builtin/commit.c to implement both commit and status.  Its\nservices may have gained callers outside builtin/cocmmit.c, but that is\nnot a good reason to export its services via builtin.h nor for it to\ninclude builtin.h.\n\nThis is a tangent but I think for the same reason the types and functions\nrelated to notes-rewrite currently in builtin.h do not belong there; they\nshould be moved to notes.h or somewhere.\n"},{"id":"155869","messageId":"7vvd3z205o.fsf@alter.siamese.dyndns.org","threadId":"25743","inReplyTo":"1289745857-16704-2-git-send-email-avarab@gmail.com","subject":"Re: [PATCH 1/4] Makefile: move \"Platform specific tweaks\" above LIB_{H,OBJS}","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-11-14T19:08:35Z","receivedAt":"2010-11-14T19:08:35Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n\n> Change the Makefile so that the \"Platform specific tweaks\" section\n> comes before the assignments to LIB_H and LIB_OBJS.\n>\n> In the ab/i18n series I only want to build gettext.o (by adding it to\n> LIB_OBJS) if NO_GETTEXT is unset. It's not possible to do that without\n> an ugly hack if we haven't applied our platform specific tweaks before\n> LIB_{H,OBJS} gets assigned to.\n\nIsn't this similar to block-sha1, which is controlled by the feature macro\nBLK_SHA1 that can be inferred from platform tweak?  The mechanism is not a\nhack but is a way LIB_H and LIB_OBJS are intended to be used, so there\nmust be something missing in your explanation.\n"},{"id":"155870","messageId":"7vr5en1zzu.fsf@alter.siamese.dyndns.org","threadId":"25743","inReplyTo":"AANLkTinaDhXQjPC6s1eFb8HwEReW7P-ObmwRn2Hpb=O4@mail.gmail.com","subject":"Re: [PATCH 1/4] Makefile: move \"Platform specific tweaks\" above LIB_{H,OBJS}","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-11-14T19:12:05Z","receivedAt":"2010-11-14T19:12:05Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n\n>> This doesn't motivate the patch all all to me.  Is changing the list\n>> of LIB_OBJS in section C1 really an ugly hack?  It is where\n>> configuration-specific things go and how BLK_SHA1, PROGRAM_OBJS, etc\n>> work already.\n>\n> Yeah, because if it hadn't come before A8 it would have been *not*\n> assigned to in the first place like we do everywhere else. Moving A8\n> before A5 enables us to do that.\n\nHmm, in the existing platform specific tweaks section, we set BLK_SHA1\nbased on $(uname_S) and that symbol is used to control what is added to\nLIB_H and LIB_OBJS.  Why is your gettext.o any different?\n"},{"id":"155927","messageId":"7v8w0umuz7.fsf@alter.siamese.dyndns.org","threadId":"25743","inReplyTo":"20101114185130.GA18385@burratino","subject":"Re: [PATCH 1/4] Makefile: move \"Platform specific tweaks\" above LIB_{H,OBJS}","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-11-15T16:07:08Z","receivedAt":"2010-11-15T16:07:08Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jonathan Nieder <jrnieder@gmail.com> writes:\n\n> Ævar Arnfjörð Bjarmason wrote:\n>\n>> That listing should be in a comment at the start of the\n>> Makefile. Please submit a patch for that!\n>\n> How about this?  An annoying piece of GNU makefile syntax makes this\n> uglier than it needs to be (search for HACK for details).\n>\n> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>\n> ---\n> diff --git a/Makefile b/Makefile\n> index 1f1ce04..38edd65 100644\n> --- a/Makefile\n> +++ b/Makefile\n> @@ -1,6 +1,8 @@\n>  # The default target of this Makefile is...\n>  all::\n>  \n> +outline:: ; @echo \"Configuration.\"\n> +\n>  # Define V=1 to have a more verbose compile.\n>  #\n>  # Define SHELL_PATH to a POSIX shell if your /bin/sh is broken.\n\nHmm, I don't quite get what you are trying to do here.  What good does the\noutput from \"make outline\" do to a potential/actual developer?  You can\nlearn that there are sections for \"Testing rules\", but then what?  You\nwill look for that string in the editor or pager.\n\nOr is this some sort of outline/org-mode hack?\n"},{"id":"155928","messageId":"20101115161122.GB16385@burratino","threadId":"25743","inReplyTo":"7v8w0umuz7.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 1/4] Makefile: move \"Platform specific tweaks\" above LIB_{H,OBJS}","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-11-15T16:11:22Z","receivedAt":"2010-11-15T16:11:22Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"On Mon, Nov 15, 2010 at 08:07:08AM -0800, Junio C Hamano wrote:\n> Jonathan Nieder <jrnieder@gmail.com> writes:\n>> Ævar Arnfjörð Bjarmason wrote:\n\n>>> That listing should be in a comment at the start of the\n>>> Makefile. Please submit a patch for that!\n>>\n>> How about this?  An annoying piece of GNU makefile syntax makes this\n>> uglier than it needs to be (search for HACK for details).\n>>\n>> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>\n>> ---\n>> diff --git a/Makefile b/Makefile\n>> index 1f1ce04..38edd65 100644\n>> --- a/Makefile\n>> +++ b/Makefile\n>> @@ -1,6 +1,8 @@\n>>  # The default target of this Makefile is...\n>>  all::\n>>  \n>> +outline:: ; @echo \"Configuration.\"\n>> +\n>>  # Define V=1 to have a more verbose compile.\n>>  #\n>>  # Define SHELL_PATH to a POSIX shell if your /bin/sh is broken.\n>\n> Hmm, I don't quite get what you are trying to do here.  What good does the\n> output from \"make outline\" do to a potential/actual developer?  You can\n> learn that there are sections for \"Testing rules\", but then what?  You\n> will look for that string in the editor or pager.\n\nI dunno.  I wrote it because Ævar asked for it (and to make visible\nwhere the trivial obstacles would lie in getting target-listing \"make help\"\nto work, which is more interesting to me).\n"},{"id":"155929","messageId":"AANLkTi=_LOczM=rC4dgXd1Xtfv8t-maurYM=KEaamPj1@mail.gmail.com","threadId":"25743","inReplyTo":"20101115161122.GB16385@burratino","subject":"Re: [PATCH 1/4] Makefile: move \"Platform specific tweaks\" above LIB_{H,OBJS}","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-11-15T16:16:39Z","receivedAt":"2010-11-15T16:16:39Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Mon, Nov 15, 2010 at 17:11, Jonathan Nieder <jrnieder@gmail.com> wrote:\n> On Mon, Nov 15, 2010 at 08:07:08AM -0800, Junio C Hamano wrote:\n>> Jonathan Nieder <jrnieder@gmail.com> writes:\n>>> Ævar Arnfjörð Bjarmason wrote:\n>\n>>>> That listing should be in a comment at the start of the\n>>>> Makefile. Please submit a patch for that!\n>>>\n>>> How about this?  An annoying piece of GNU makefile syntax makes this\n>>> uglier than it needs to be (search for HACK for details).\n>>>\n>>> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>\n>>> ---\n>>> diff --git a/Makefile b/Makefile\n>>> index 1f1ce04..38edd65 100644\n>>> --- a/Makefile\n>>> +++ b/Makefile\n>>> @@ -1,6 +1,8 @@\n>>>  # The default target of this Makefile is...\n>>>  all::\n>>>\n>>> +outline:: ; @echo \"Configuration.\"\n>>> +\n>>>  # Define V=1 to have a more verbose compile.\n>>>  #\n>>>  # Define SHELL_PATH to a POSIX shell if your /bin/sh is broken.\n>>\n>> Hmm, I don't quite get what you are trying to do here.  What good does the\n>> output from \"make outline\" do to a potential/actual developer?  You can\n>> learn that there are sections for \"Testing rules\", but then what?  You\n>> will look for that string in the editor or pager.\n>\n> I dunno.  I wrote it because Ævar asked for it (and to make visible\n> where the trivial obstacles would lie in getting target-listing \"make help\"\n> to work, which is more interesting to me).\n\nI just meant that we should add your comment at the top at some point.\n\nBut doing it via something like outline is probably better in the long term.\n\nBut let's do it in another patch series :)\n"},{"id":"156064","messageId":"7vzkt7enfn.fsf@alter.siamese.dyndns.org","threadId":"25743","inReplyTo":"1289745857-16704-5-git-send-email-avarab@gmail.com","subject":"Re: [PATCH 4/4] builtin: use builtin.h for all builtin commands","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-11-17T19:54:04Z","receivedAt":"2010-11-17T19:54:04Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:\n\n> Change the builtin/*.c files and wt-status.c files which weren't using\n> builtin.h to use it, also remove any git-compat-util.h, strbuf.h and\n> cache.h from those files. We can trust on builtin.h including them.\n\nAs I already said, buitlin/*.c is fine, but wt-status.c is very dubious.\n\n> This impeded my efforts to gettextize git, since I'd otherwise have to\n> add gettext.h to all of these. Using builtin.h is a good idea in any\n> case, since it's defining the prototypes for the cmd_* functions that\n> these files define.\n\nWhat about non-builtin commands?  Don't they need to include gettext.h\nanyway?\n\nI would have expected that gettext.h would be included from cache.h, so\nthat all gitty commands, whether they are builtin or standalone, have\naccess to the symbols defined in it.\n"},{"id":"156065","messageId":"AANLkTikw0+FGJmj7C0B9J_3ZVXrbqCw+UzyP3sqfyVdm@mail.gmail.com","threadId":"25743","inReplyTo":"7vzkt7enfn.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 4/4] builtin: use builtin.h for all builtin commands","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-11-17T20:08:29Z","receivedAt":"2010-11-17T20:08:29Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Wed, Nov 17, 2010 at 20:54, Junio C Hamano <gitster@pobox.com> wrote:\n> Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:\n>\n>> Change the builtin/*.c files and wt-status.c files which weren't using\n>> builtin.h to use it, also remove any git-compat-util.h, strbuf.h and\n>> cache.h from those files. We can trust on builtin.h including them.\n>\n> As I already said, buitlin/*.c is fine, but wt-status.c is very dubious.\n\nSo I should resend this patch with `#include \"gettext.h\"` in\nwt-status.c and the rest unchanged, along with a new commit message?\n\n>> This impeded my efforts to gettextize git, since I'd otherwise have to\n>> add gettext.h to all of these. Using builtin.h is a good idea in any\n>> case, since it's defining the prototypes for the cmd_* functions that\n>> these files define.\n>\n> What about non-builtin commands?  Don't they need to include gettext.h\n> anyway?\n\nIn my patch to add gettext infrastructure I add gettext.h to\nimap-send.c and friends which have their own main.\n\n> I would have expected that gettext.h would be included from cache.h, so\n> that all gitty commands, whether they are builtin or standalone, have\n> access to the symbols defined in it.\n\nI can do that too. I just got the impression previously that we wanted\nto only include things in headers that made sense according to their\nname. Gettext has nothing to do with the cache, and cache.h itself\ndoesn't need it.\n\nBut if we want to stick it in there that's fine by me, I just care\nabout the ends, not the means. So just say which way you want it and I\ncan cook up a patch.\n"},{"id":"156066","messageId":"20101117201509.GA27452@burratino","threadId":"25743","inReplyTo":"AANLkTikw0+FGJmj7C0B9J_3ZVXrbqCw+UzyP3sqfyVdm@mail.gmail.com","subject":"Re: [PATCH 4/4] builtin: use builtin.h for all builtin commands","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-11-17T20:15:09Z","receivedAt":"2010-11-17T20:15:09Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Ævar Arnfjörð Bjarmason wrote:\n\n> I can do that too. I just got the impression previously that we wanted\n> to only include things in headers that made sense according to their\n> name. Gettext has nothing to do with the cache, and cache.h itself\n> doesn't need it.\n\nA little bit of history: git was once called dircache.  cache.h is\npractically speaking git.h, which is why it declares:\n\n - get_git_dir\n - ALLOC_GROW\n - zlib_compression_level\n - safe_crlf\n - mksnpath\n - git_pathdup\n - hashclr\n - validate_headref\n - peel_to_type\n - approxidate_careful\n - packed_git\n - path_match\n - fsync_or_die\n - setup_pager\n - checkout_fast_forward\n\nto list a random assortment.  See \"A birds-eye view of Git's source\ncode\" in the user manual for more on this.\n"}]}