{"thread":{"id":"50352","subject":"[PATCH (Apple Git) 05/13] t5701: git --version can have SP in it","startedAt":"2019-01-29T20:04:37Z","lastAt":"2019-01-31T19:48:22Z","messageCount":63,"participants":["Jeremy Huddleston Sequoia","Junio C Hamano","Eric Wong","SZEDER Gábor","Jeremy Sequoia","Carlo Arenas","brian m. carlson","Eric Sunshine","Johannes Schindelin","Jonathan Nieder"],"isPatch":true,"patchVersion":1,"patchTotal":13},"messages":[{"id":"368032","messageId":"20190129193818.8645-6-jeremyhu@apple.com","threadId":"50352","inReplyTo":"20190129193818.8645-1-jeremyhu@apple.com","subject":"[PATCH (Apple Git) 05/13] t5701: git --version can have SP in it","fromName":"Jeremy Huddleston Sequoia","fromEmail":"jeremyhu@apple.com","sentAt":"2019-01-29T19:38:11Z","receivedAt":"2019-01-29T20:04:37Z","isPatch":true,"sender":{"key":"jeremyhu@apple.com","avatar":"https://avatars.githubusercontent.com/u/1258676?v=4"},"body":"Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>\n---\n t/t5701-git-serve.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t5701-git-serve.sh b/t/t5701-git-serve.sh\nindex ae79c6bbc0..7bc25700fa 100755\n--- a/t/t5701-git-serve.sh\n+++ b/t/t5701-git-serve.sh\n@@ -7,7 +7,7 @@ test_description='test git-serve and server commands'\n test_expect_success 'test capability advertisement' '\n \tcat >expect <<-EOF &&\n \tversion 2\n-\tagent=git/$(git version | cut -d\" \" -f3)\n+\tagent=git/$(git --version | sed -e \"s/git version //\" -e \"s/ /\\./g\")\n \tls-refs\n \tfetch=shallow\n \tserver-option\n-- \n2.20.0 (Apple Git-115)\n\n"},{"id":"368033","messageId":"20190129193818.8645-9-jeremyhu@apple.com","threadId":"50352","inReplyTo":"20190129193818.8645-1-jeremyhu@apple.com","subject":"[PATCH (Apple Git) 08/13] git mergetool/difftool doesn't list 'opendiff' as an available tool on 10.8","fromName":"Jeremy Huddleston Sequoia","fromEmail":"jeremyhu@apple.com","sentAt":"2019-01-29T19:38:14Z","receivedAt":"2019-01-29T20:04:43Z","isPatch":true,"sender":{"key":"jeremyhu@apple.com","avatar":"https://avatars.githubusercontent.com/u/1258676?v=4"},"body":"See <rdar://problem/12652310>\n\nSigned-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>\n---\n git-mergetool--lib.sh | 6 ++++--\n 1 file changed, 4 insertions(+), 2 deletions(-)\n\ndiff --git a/git-mergetool--lib.sh b/git-mergetool--lib.sh\nindex 83bf52494c..f85be7406f 100644\n--- a/git-mergetool--lib.sh\n+++ b/git-mergetool--lib.sh\n@@ -273,9 +273,9 @@ list_merge_tool_candidates () {\n \tthen\n \t\tif test -n \"$GNOME_DESKTOP_SESSION_ID\"\n \t\tthen\n-\t\t\ttools=\"meld opendiff kdiff3 tkdiff xxdiff $tools\"\n+\t\t\ttools=\"meld kdiff3 tkdiff xxdiff $tools\"\n \t\telse\n-\t\t\ttools=\"opendiff kdiff3 tkdiff xxdiff meld $tools\"\n+\t\t\ttools=\"kdiff3 tkdiff xxdiff meld $tools\"\n \t\tfi\n \t\ttools=\"$tools gvimdiff diffuse diffmerge ecmerge\"\n \t\ttools=\"$tools p4merge araxis bc codecompare\"\n@@ -288,6 +288,8 @@ list_merge_tool_candidates () {\n \t\ttools=\"$tools emerge vimdiff\"\n \t\t;;\n \tesac\n+\n+\ttools=\"opendiff $tools\"\n }\n \n show_tool_help () {\n-- \n2.20.0 (Apple Git-115)\n\n"},{"id":"368034","messageId":"20190129193818.8645-7-jeremyhu@apple.com","threadId":"50352","inReplyTo":"20190129193818.8645-1-jeremyhu@apple.com","subject":"[PATCH (Apple Git) 06/13] Set Apple Git version during build","fromName":"Jeremy Huddleston Sequoia","fromEmail":"jeremyhu@apple.com","sentAt":"2019-01-29T19:38:12Z","receivedAt":"2019-01-29T20:06:42Z","isPatch":true,"sender":{"key":"jeremyhu@apple.com","avatar":"https://avatars.githubusercontent.com/u/1258676?v=4"},"body":"Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>\n---\n GIT-VERSION-GEN | 4 ++++\n 1 file changed, 4 insertions(+)\n\ndiff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN\nindex d1a2814ec7..6fb90854b9 100755\n--- a/GIT-VERSION-GEN\n+++ b/GIT-VERSION-GEN\n@@ -3,6 +3,10 @@\n GVF=GIT-VERSION-FILE\n DEF_VER=v2.20.1\n \n+if [ -n \"$RC_ProjectSourceVersion\" ] ; then\n+\tDEF_VER=\"$DEF_VER (Apple Git-$RC_ProjectSourceVersion)\"\n+fi\n+\n LF='\n '\n \n-- \n2.20.0 (Apple Git-115)\n\n"},{"id":"368035","messageId":"20190129193818.8645-1-jeremyhu@apple.com","threadId":"50352","inReplyTo":null,"subject":"[PATCH (Apple Git) 00/13] Differences between git-2.20.1 and Apple Git-116","fromName":"Jeremy Huddleston Sequoia","fromEmail":"jeremyhu@apple.com","sentAt":"2019-01-29T19:38:06Z","receivedAt":"2019-01-29T20:06:45Z","isPatch":true,"sender":{"key":"jeremyhu@apple.com","avatar":"https://avatars.githubusercontent.com/u/1258676?v=4"},"body":"Xcode 10.2 Beta 1 contains Apple Git-116.  A couple months ago, Peff encouraged\nme to re-send our changes in a patch series to the mailing list, so here they\nare!\n\nAs reference, these (and past patch series for Apple Git) are availale at:\n    https://github.com/jeremyhu/git\n\nSome of these patches are upstreamable as is, but othes represent areas where\ncustomization options could be provided upstream to allow similar behavior.\n\nNote that I am very grateful for the recent changes in mainline to support\nRUNTIME_PREFIX on darwin.  It almost completely replaced our RUNTIME_PREFIX\nimplementation and made the few remaining changes much more maintainale.\n\nPlease integrate the changes that are upstreamable and let's use the others\nas a starting point for discussing how to accomplish the same effect through\nconfiguration options or other means.\n\nThanks,\nJeremy\n\n\n"},{"id":"368036","messageId":"20190129193818.8645-10-jeremyhu@apple.com","threadId":"50352","inReplyTo":"20190129193818.8645-1-jeremyhu@apple.com","subject":"[PATCH (Apple Git) 09/13] Use symbolic links rather than hard links for files in libexec","fromName":"Jeremy Huddleston Sequoia","fromEmail":"jeremyhu@apple.com","sentAt":"2019-01-29T19:38:15Z","receivedAt":"2019-01-29T20:08:16Z","isPatch":true,"sender":{"key":"jeremyhu@apple.com","avatar":"https://avatars.githubusercontent.com/u/1258676?v=4"},"body":"See <rdar://problem/10573201>\n\nSigned-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>\n---\n Makefile | 6 +-----\n 1 file changed, 1 insertion(+), 5 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 1a44c811aa..60711d6abe 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -2065,10 +2065,7 @@ version.sp version.s version.o: EXTRA_CPPFLAGS = \\\n \t\tgit rev-parse -q --verify HEAD 2>/dev/null)\"'\n \n $(BUILT_INS): git$X\n-\t$(QUIET_BUILT_IN)$(RM) $@ && \\\n-\tln $< $@ 2>/dev/null || \\\n-\tln -s $< $@ 2>/dev/null || \\\n-\tcp $< $@\n+\t$(QUIET_BUILT_IN)ln -fs $< $@\n \n command-list.h: generate-cmdlist.sh command-list.txt\n \n@@ -2387,7 +2384,6 @@ git-remote-testsvn$X: remote-testsvn.o GIT-LDFLAGS $(GITLIBS) $(VCSSVN_LIB)\n \n $(REMOTE_CURL_ALIASES): $(REMOTE_CURL_PRIMARY)\n \t$(QUIET_LNCP)$(RM) $@ && \\\n-\tln $< $@ 2>/dev/null || \\\n \tln -s $< $@ 2>/dev/null || \\\n \tcp $< $@\n \n-- \n2.20.0 (Apple Git-115)\n\n"},{"id":"368037","messageId":"20190129193818.8645-2-jeremyhu@apple.com","threadId":"50352","inReplyTo":"20190129193818.8645-1-jeremyhu@apple.com","subject":"[PATCH (Apple Git) 01/13] .gitignore: Remove *.s as it matches *.S on case insensitive filesystem","fromName":"Jeremy Huddleston Sequoia","fromEmail":"jeremyhu@apple.com","sentAt":"2019-01-29T19:38:07Z","receivedAt":"2019-01-29T20:11:29Z","isPatch":true,"sender":{"key":"jeremyhu@apple.com","avatar":"https://avatars.githubusercontent.com/u/1258676?v=4"},"body":"This was causing problems with ppc/sha1ppc.S\n\nSigned-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>\n---\n .gitignore | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/.gitignore b/.gitignore\nindex 0d77ea5894..a5db584576 100644\n--- a/.gitignore\n+++ b/.gitignore\n@@ -195,7 +195,7 @@\n *.deb\n /git.spec\n *.exe\n-*.[aos]\n+*.[ao]\n *.py[co]\n .depend/\n *.gcda\n-- \n2.20.0 (Apple Git-115)\n\n"},{"id":"368040","messageId":"20190129193818.8645-5-jeremyhu@apple.com","threadId":"50352","inReplyTo":"20190129193818.8645-1-jeremyhu@apple.com","subject":"[PATCH (Apple Git) 04/13] t4014: git --version can have SP in it","fromName":"Jeremy Huddleston Sequoia","fromEmail":"jeremyhu@apple.com","sentAt":"2019-01-29T19:38:10Z","receivedAt":"2019-01-29T20:35:25Z","isPatch":true,"sender":{"key":"jeremyhu@apple.com","avatar":"https://avatars.githubusercontent.com/u/1258676?v=4"},"body":"480871e09e (\"format-patch: show base info before email signature\",\n2016-09-07) added a helper function to recreate the signature at the end\nof the e-mail, i.e. \"-- \" line followed by the version string of Git,\nusing output from \"git --version\" and stripping everything before the last\nSP.\n\nBecause the default Git version string looks like \"git version\n2.10.0-1-g480871e09e\", this was mostly OK, but people can change this\nversion string to arbitrary thing while compiling, which can break the\nassumption if they had SP in it.  Notably, Apple ships modified Git with\n\" (Apple Git-xx)\" appended to its version number.\n\nInstead, come up with the version string by stripping the \"git version \"\nfrom the beginning.\n\nRegressed-in: 480871e09ed2e5275b4ba16b278681e5a8c122ae\nSigned-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>\nReviewed-by: Josh Triplett <josh@joshtriplett.org>\n---\n t/t4014-format-patch.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh\nindex 909c743c13..414c56fcff 100755\n--- a/t/t4014-format-patch.sh\n+++ b/t/t4014-format-patch.sh\n@@ -757,7 +757,7 @@ test_expect_success 'format-patch --ignore-if-in-upstream HEAD' '\n \tgit format-patch --ignore-if-in-upstream HEAD\n '\n \n-git_version=\"$(git --version | sed \"s/.* //\")\"\n+git_version=\"$(git --version | sed \"s/git version //\")\"\n \n signature() {\n \tprintf \"%s\\n%s\\n\\n\" \"-- \" \"${1:-$git_version}\"\n-- \n2.20.0 (Apple Git-115)\n\n"},{"id":"368041","messageId":"20190129193818.8645-11-jeremyhu@apple.com","threadId":"50352","inReplyTo":"20190129193818.8645-1-jeremyhu@apple.com","subject":"[PATCH (Apple Git) 10/13] Support for Xcode.app co-exestince and relocation","fromName":"Jeremy Huddleston Sequoia","fromEmail":"jeremyhu@apple.com","sentAt":"2019-01-29T19:38:16Z","receivedAt":"2019-01-29T20:37:41Z","isPatch":true,"sender":{"key":"jeremyhu@apple.com","avatar":"https://avatars.githubusercontent.com/u/1258676?v=4"},"body":"This patch has been trimmed down significantly from its original version\nwhen rebasing on top of git 2.18 because git 2.18 included support for\nruntime prefix support for darwin, making this patch mostly duplicative.\n\nThe remaining changes are needed to ensure that git-perl can find the\nsubversion perl module (which relocates with it) and handle relocation\nof python scripts.\n\nSigned-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>\n---\n Makefile                                      |  3 +++\n .../runtime_prefix.template.pl                | 25 +++++++++++++++++++\n 2 files changed, 28 insertions(+)\n\ndiff --git a/Makefile b/Makefile\nindex 60711d6abe..97f46444f5 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -2171,6 +2171,7 @@ GIT-PERL-HEADER: $(PERL_HEADER_TEMPLATE) GIT-PERL-DEFINES Makefile\n \tsed -e 's=@@PATHSEP@@=$(pathsep)=g' \\\n \t    -e \"s=@@INSTLIBDIR@@=$$INSTLIBDIR=g\" \\\n \t    -e 's=@@PERLLIBDIR_REL@@=$(perllibdir_relative_SQ)=g' \\\n+\t    -e 's=@@PERLVERSION@@=$(shell grep DEFAULT /usr/local/versioner/perl/versions | sed 's:^.*= *\\([^ ]*\\)$$:\\1:')=g' \\\n \t    -e 's=@@GITEXECDIR_REL@@=$(gitexecdir_relative_SQ)=g' \\\n \t    -e 's=@@LOCALEDIR_REL@@=$(localedir_relative_SQ)=g' \\\n \t    $< >$@+ && \\\n@@ -2206,6 +2207,8 @@ $(SCRIPT_PYTHON_GEN): GIT-CFLAGS GIT-PREFIX GIT-PYTHON-VARS\n $(SCRIPT_PYTHON_GEN): % : %.py\n \t$(QUIET_GEN)$(RM) $@ $@+ && \\\n \tsed -e '1s|#!.*python|#!$(PYTHON_PATH_SQ)|' \\\n+\t    -e 's|\\(os\\.getenv(\"GITPYTHONLIB\"\\)[^)]*)|\\1,\"@@INSTLIBDIR@@\")|' \\\n+\t    -e 's|\"@@INSTLIBDIR@@\"|os.path.realpath(os.path.dirname(sys.argv[0])) + \"/../../share/git-core/python\"|g' \\\n \t    $< >$@+ && \\\n \tchmod +x $@+ && \\\n \tmv $@+ $@\ndiff --git a/perl/header_templates/runtime_prefix.template.pl b/perl/header_templates/runtime_prefix.template.pl\nindex 9d28b3d863..b0b6b0bef1 100644\n--- a/perl/header_templates/runtime_prefix.template.pl\n+++ b/perl/header_templates/runtime_prefix.template.pl\n@@ -1,3 +1,28 @@\n+# BEGIN XCODE RUNTIME_PREFIX generated code\n+BEGIN {\n+    use File::Spec;\n+    my $PERLVERSION = \"@@PERLVERSION@@\";\n+    if ($^V =~ m/v([0-9]+).([0-9]+)/) {\n+        $PERLVERSION = $1.\".\".$2;\n+    }\n+    my $__prefix = File::Spec->rel2abs( __FILE__ );\n+\n+    if ($__prefix =~ m/\\/libexec\\/git-core\\// ) {\n+        $__prefix =~ s/\\/libexec\\/git-core\\/.*//;\n+        unshift @INC, $__prefix . \"/share/git-core/perl\";\n+        unshift @INC, $__prefix . \"/../Library/Perl/\".$PERLVERSION.\"/darwin-thread-multi-2level\";\n+    } elsif ($__prefix =~ m/\\/bin\\// ) {\n+        $__prefix =~ s/\\/bin\\/.*//;\n+        unshift @INC, $__prefix . \"/share/git-core/perl\";\n+        unshift @INC, $__prefix . \"/../Library/Perl/\".$PERLVERSION.\"/darwin-thread-multi-2level\";\n+    } elsif ( $__prefix =~ m/\\/usr\\// ) {\n+        $__prefix =~ s/\\/usr\\/.*/\\/usr/;\n+        unshift @INC, $__prefix . \"/share/git-core/perl\";\n+        unshift @INC, $__prefix . \"/../Library/Perl/\".$PERLVERSION.\"/darwin-thread-multi-2level\";\n+    }\n+}\n+# END XCODE RUNTIME_PREFIX generated code.\n+\n # BEGIN RUNTIME_PREFIX generated code.\n #\n # This finds our Git::* libraries relative to the script's runtime path.\n-- \n2.20.0 (Apple Git-115)\n\n"},{"id":"368042","messageId":"20190129193818.8645-8-jeremyhu@apple.com","threadId":"50352","inReplyTo":"20190129193818.8645-1-jeremyhu@apple.com","subject":"[PATCH (Apple Git) 07/13] HTML documentation is not provided with Apple's git. Make the error message more on point.","fromName":"Jeremy Huddleston Sequoia","fromEmail":"jeremyhu@apple.com","sentAt":"2019-01-29T19:38:13Z","receivedAt":"2019-01-29T20:37:47Z","isPatch":true,"sender":{"key":"jeremyhu@apple.com","avatar":"https://avatars.githubusercontent.com/u/1258676?v=4"},"body":"Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>\n---\n builtin/help.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/builtin/help.c b/builtin/help.c\nindex 7739a5c155..e001b6157c 100644\n--- a/builtin/help.c\n+++ b/builtin/help.c\n@@ -383,7 +383,7 @@ static void get_html_page_path(struct strbuf *page_path, const char *page)\n \tif (!strstr(html_path, \"://\")) {\n \t\tif (stat(mkpath(\"%s/git.html\", html_path), &st)\n \t\t    || !S_ISREG(st.st_mode))\n-\t\t\tdie(\"'%s': not a documentation directory.\", html_path);\n+\t\t\tdie(\"HTML documentation is not provided by this distribution of git.\");\n \t}\n \n \tstrbuf_init(page_path, 0);\n-- \n2.20.0 (Apple Git-115)\n\n"},{"id":"368046","messageId":"20190129193818.8645-4-jeremyhu@apple.com","threadId":"50352","inReplyTo":"20190129193818.8645-1-jeremyhu@apple.com","subject":"[PATCH (Apple Git) 03/13] t0500: New regression test for git add of a path that contains a .git directory","fromName":"Jeremy Huddleston Sequoia","fromEmail":"jeremyhu@apple.com","sentAt":"2019-01-29T19:38:09Z","receivedAt":"2019-01-29T21:19:16Z","isPatch":true,"sender":{"key":"jeremyhu@apple.com","avatar":"https://avatars.githubusercontent.com/u/1258676?v=4"},"body":"Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>\n---\n t/t0500-apple.sh | 40 ++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 40 insertions(+)\n create mode 100755 t/t0500-apple.sh\n\ndiff --git a/t/t0500-apple.sh b/t/t0500-apple.sh\nnew file mode 100755\nindex 0000000000..d5f79237a8\n--- /dev/null\n+++ b/t/t0500-apple.sh\n@@ -0,0 +1,40 @@\n+#!/bin/sh\n+#\n+# Copyright (c) 2012-2016 Apple Inc.\n+#\n+# Tests for regressions found by Apple Inc. for issues that upstream does not\n+# want to fix or accept tests for.\n+\n+\n+test_description='Apple Inc. specific tests'\n+\n+. ./test-lib.sh\n+\n+TESTROOT=$(pwd)\n+\n+# <rdar://problem/10238070>\n+#\n+# This test case addresses a regression introduced between v1.7.3 and v1.7.5\n+# git bisect good v1.7.3\n+# git bisect bad v1.7.5\n+# ...\n+# found 18e051a3981f38db08521bb61ccf7e4571335353\n+\n+test_expect_success '<rdar://problem/10238070> -- git add of a path that contains a .git directory' '\n+\trm -rf .git &&\n+\tmkdir -p orig/sub/dir/otherdir &&\n+\tcd orig/sub &&\n+\techo \"1\" > dir/file &&\n+\techo \"2\" > dir/otherdir/file &&\n+\tgit init --quiet &&\n+\tgit add -A &&\n+\tgit commit -m \"Initial Commit\" --quiet &&\n+\tcd - > /dev/null &&\n+\tgit init --bare --quiet \"${TESTROOT}/git_dir.git\" &&\n+\tgit --git-dir=\"${TESTROOT}/git_dir.git\" --work-tree=/ add -f -- \"${TESTROOT}/orig/sub/\" &&\n+\tgit --git-dir=\"${TESTROOT}/git_dir.git\" --work-tree=/ add -f -- \"${TESTROOT}/orig/\" &&\n+\tgit --git-dir=\"${TESTROOT}/git_dir.git\" --work-tree=/ commit -m \"Commit.\" |\n+\t\tgrep -q \"2 files changed, 2 insertions\"\n+'\n+\n+test_done\n-- \n2.20.0 (Apple Git-115)\n\n"},{"id":"368048","messageId":"20190129193818.8645-13-jeremyhu@apple.com","threadId":"50352","inReplyTo":"20190129193818.8645-1-jeremyhu@apple.com","subject":"[PATCH (Apple Git) 12/13] Enable support for Xcode.app-bundled gitconfig","fromName":"Jeremy Huddleston Sequoia","fromEmail":"jeremyhu@apple.com","sentAt":"2019-01-29T19:38:18Z","receivedAt":"2019-01-29T21:31:42Z","isPatch":true,"sender":{"key":"jeremyhu@apple.com","avatar":"https://avatars.githubusercontent.com/u/1258676?v=4"},"body":"Useful for setting up osxkeychain in Xcode.app's gitconfig\n\nSigned-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>\n---\n config.c | 13 +++++++++++++\n config.h |  2 ++\n 2 files changed, 15 insertions(+)\n\ndiff --git a/config.c b/config.c\nindex ff521eb27a..656bfef8ab 100644\n--- a/config.c\n+++ b/config.c\n@@ -1631,6 +1631,14 @@ const char *git_etc_gitconfig(void)\n \treturn system_wide;\n }\n \n+const char *git_xcode_gitconfig(void)\n+{\n+\tstatic const char *xcode_config;\n+\tif (!xcode_config)\n+\t\txcode_config = system_path(\"share/git-core/gitconfig\");\n+\treturn xcode_config;\n+}\n+\n /*\n  * Parse environment variable 'k' as a boolean (in various\n  * possible spellings); if missing, use the default value 'def'.\n@@ -1673,6 +1681,11 @@ static int do_git_config_sequence(const struct config_options *opts,\n \telse\n \t\trepo_config = NULL;\n \n+\tcurrent_parsing_scope = CONFIG_SCOPE_XCODE;\n+\tif (git_config_system() && git_xcode_gitconfig() && !access_or_die(git_xcode_gitconfig(), R_OK, 0))\n+\t\tret += git_config_from_file(fn, git_xcode_gitconfig(),\n+\t\t\t\t\t    data);\n+\n \tcurrent_parsing_scope = CONFIG_SCOPE_SYSTEM;\n \tif (git_config_system() && !access_or_die(git_etc_gitconfig(), R_OK, 0))\n \t\tret += git_config_from_file(fn, git_etc_gitconfig(),\ndiff --git a/config.h b/config.h\nindex ee5d3fa7b4..f848423d28 100644\n--- a/config.h\n+++ b/config.h\n@@ -115,6 +115,7 @@ extern int git_config_rename_section_in_file(const char *, const char *, const c\n extern int git_config_copy_section(const char *, const char *);\n extern int git_config_copy_section_in_file(const char *, const char *, const char *);\n extern const char *git_etc_gitconfig(void);\n+extern const char *git_xcode_gitconfig(void);\n extern int git_env_bool(const char *, int);\n extern unsigned long git_env_ulong(const char *, unsigned long);\n extern int git_config_system(void);\n@@ -131,6 +132,7 @@ enum config_scope {\n \tCONFIG_SCOPE_GLOBAL,\n \tCONFIG_SCOPE_REPO,\n \tCONFIG_SCOPE_CMDLINE,\n+\tCONFIG_SCOPE_XCODE,\n };\n \n extern enum config_scope current_config_scope(void);\n-- \n2.20.0 (Apple Git-115)\n\n"},{"id":"368049","messageId":"20190129193818.8645-14-jeremyhu@apple.com","threadId":"50352","inReplyTo":"20190129193818.8645-1-jeremyhu@apple.com","subject":"[PATCH (Apple Git) 13/13] Enable support for Xcode.app-bundled gitattributes","fromName":"Jeremy Huddleston Sequoia","fromEmail":"jeremyhu@apple.com","sentAt":"2019-01-29T19:38:19Z","receivedAt":"2019-01-29T21:32:36Z","isPatch":true,"sender":{"key":"jeremyhu@apple.com","avatar":"https://avatars.githubusercontent.com/u/1258676?v=4"},"body":"Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>\n---\n attr.c | 11 +++++++++++\n 1 file changed, 11 insertions(+)\n\ndiff --git a/attr.c b/attr.c\nindex eaece6658d..1b87905d4a 100644\n--- a/attr.c\n+++ b/attr.c\n@@ -823,6 +823,14 @@ static const char *git_etc_gitattributes(void)\n \treturn system_wide;\n }\n \n+static const char *git_xcode_gitattributes(void)\n+{\n+\tstatic const char *xcode_gitattributes;\n+\tif (!xcode_gitattributes)\n+\t\txcode_gitattributes = system_path(\"share/git-core/gitattributes\");\n+\treturn xcode_gitattributes;\n+}\n+\n static const char *get_home_gitattributes(void)\n {\n \tif (!git_attributes_file)\n@@ -864,6 +872,9 @@ static void bootstrap_attr_stack(const struct index_state *istate,\n \n \t/* system-wide frame */\n \tif (git_attr_system()) {\n+\t\te = read_attr_from_file(git_xcode_gitattributes(), 1);\n+\t\tpush_stack(stack, e, NULL, 0);\n+\n \t\te = read_attr_from_file(git_etc_gitattributes(), 1);\n \t\tpush_stack(stack, e, NULL, 0);\n \t}\n-- \n2.20.0 (Apple Git-115)\n\n"},{"id":"368055","messageId":"20190129193818.8645-3-jeremyhu@apple.com","threadId":"50352","inReplyTo":"20190129193818.8645-1-jeremyhu@apple.com","subject":"[PATCH (Apple Git) 02/13] test-lib: Export PERL5LIB for testing git-svn","fromName":"Jeremy Huddleston Sequoia","fromEmail":"jeremyhu@apple.com","sentAt":"2019-01-29T19:38:08Z","receivedAt":"2019-01-29T22:05:31Z","isPatch":true,"sender":{"key":"jeremyhu@apple.com","avatar":"https://avatars.githubusercontent.com/u/1258676?v=4"},"body":"Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>\n---\n t/test-lib.sh | 3 +++\n 1 file changed, 3 insertions(+)\n\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 0f1faa24b2..4060a53f56 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -1017,6 +1017,9 @@ fi\n \n GITPERLLIB=\"$GIT_BUILD_DIR\"/perl/build/lib\n export GITPERLLIB\n+PERL_VERSION=$(grep DEFAULT /usr/local/versioner/perl/versions | sed 's:^.*= *\\([^ ]*\\)$:\\1:')\n+PERL5LIB=\"$GIT_BUILD_DIR\"/perl:\"$(xcode-select -p)\"/Library/Perl/$PERL_VERSION\n+export PERL5LIB\n test -d \"$GIT_BUILD_DIR\"/templates/blt || {\n \terror \"You haven't built things yet, have you?\"\n }\n-- \n2.20.0 (Apple Git-115)\n\n"},{"id":"368061","messageId":"xmqq1s4v6pzm.fsf@gitster-ct.c.googlers.com","threadId":"50352","inReplyTo":"20190129193818.8645-3-jeremyhu@apple.com","subject":"Re: [PATCH (Apple Git) 02/13] test-lib: Export PERL5LIB for testing git-svn","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-01-29T22:47:09Z","receivedAt":"2019-01-29T22:47:15Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeremy Huddleston Sequoia <jeremyhu@apple.com> writes:\n\n> Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>\n> ---\n>  t/test-lib.sh | 3 +++\n>  1 file changed, 3 insertions(+)\n\nThis obviously won't be acceptable as-is to my tree.  Shouldn't this\nbe something to be dealt with in config.mak.uname or something that\nis meant to define platform-specific customization?\n\n>\n> diff --git a/t/test-lib.sh b/t/test-lib.sh\n> index 0f1faa24b2..4060a53f56 100644\n> --- a/t/test-lib.sh\n> +++ b/t/test-lib.sh\n> @@ -1017,6 +1017,9 @@ fi\n>  \n>  GITPERLLIB=\"$GIT_BUILD_DIR\"/perl/build/lib\n>  export GITPERLLIB\n> +PERL_VERSION=$(grep DEFAULT /usr/local/versioner/perl/versions | sed 's:^.*= *\\([^ ]*\\)$:\\1:')\n> +PERL5LIB=\"$GIT_BUILD_DIR\"/perl:\"$(xcode-select -p)\"/Library/Perl/$PERL_VERSION\n> +export PERL5LIB\n>  test -d \"$GIT_BUILD_DIR\"/templates/blt || {\n>  \terror \"You haven't built things yet, have you?\"\n>  }\n"},{"id":"368062","messageId":"20190129193818.8645-12-jeremyhu@apple.com","threadId":"50352","inReplyTo":"20190129193818.8645-1-jeremyhu@apple.com","subject":"[PATCH (Apple Git) 11/13] Fix problem found from running the test suite.","fromName":"Jeremy Huddleston Sequoia","fromEmail":"jeremyhu@apple.com","sentAt":"2019-01-29T19:38:17Z","receivedAt":"2019-01-29T22:50:32Z","isPatch":true,"sender":{"key":"jeremyhu@apple.com","avatar":"https://avatars.githubusercontent.com/u/1258676?v=4"},"body":"From: Matt Wright <mww@apple.com>\n\nSigned-off-by: Matt Wright <mww@apple.com>\n---\n git-svn.perl | 30 ++++++++++++++++++++++++++++++\n 1 file changed, 30 insertions(+)\n\ndiff --git a/git-svn.perl b/git-svn.perl\nindex 050f2a36f4..d29730be3b 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -1815,6 +1815,36 @@ sub complete_url_ls_init {\n \n sub verify_ref {\n \tmy ($ref) = @_;\n+\n+\tif ($ref =~ /^(.*)\\^0$/) {\n+\t\tmy $baseref = $1;\n+\t\tmy $p = \"$ENV{GIT_DIR}/$baseref\";\n+\t\t$p = \"$ENV{GIT_DIR}/refs/remotes/$baseref\" unless -e $p;\n+\t\t$p = \"$ENV{GIT_DIR}/refs/$baseref\" unless -e $p;\n+\t\t$p = \"$ENV{GIT_DIR}/refs/heads/$baseref\" unless -e $p;\n+\n+\t\tmy $resolved = undef;\n+\t\tif (-e $p) {\n+\t\t\topen FH, $p;\n+\t\t\t$resolved = <FH>;\n+\t\t\tchomp $resolved;\n+\t\t\tclose FH;\n+\t\t} elsif (-e \"$ENV{GIT_DIR}/packed-refs\") {\n+\t\t\topen FH, \"$ENV{GIT_DIR}/packed-refs\";\n+\t\t\twhile (<FH>) {\n+\t\t\t\tif ($_ =~ /^([0-9a-fA-F]+) ((refs\\/)?(remotes\\/|heads\\/|\\/)?$baseref)$/) {\n+\t\t\t\t\t$resolved = $1;\n+\t\t\t\t\tlast;\n+\t\t\t\t}\n+\t\t\t}\n+\t\t}\n+\n+\t\tif (defined($resolved)) {\n+\t\t\treturn verify_ref(\"$1^0\") if $resolved =~ /^ref: (.*)$/;\n+\t\t\treturn $resolved\n+\t\t}\n+\t}\n+\n \teval { command_oneline([ 'rev-parse', '--verify', $ref ],\n \t                       { STDERR => 0 }); };\n }\n-- \n2.20.0 (Apple Git-115)\n\n"},{"id":"368064","messageId":"xmqqwomn5awd.fsf@gitster-ct.c.googlers.com","threadId":"50352","inReplyTo":"20190129193818.8645-5-jeremyhu@apple.com","subject":"Re: [PATCH (Apple Git) 04/13] t4014: git --version can have SP in it","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-01-29T22:58:26Z","receivedAt":"2019-01-29T22:58:30Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeremy Huddleston Sequoia <jeremyhu@apple.com> writes:\n\n> Because the default Git version string looks like \"git version\n> 2.10.0-1-g480871e09e\", this was mostly OK, but people can change this\n> version string to arbitrary thing while compiling, which can break the\n> assumption if they had SP in it.  Notably, Apple ships modified Git with\n> \" (Apple Git-xx)\" appended to its version number.\n\nI am not sure if that customization is a sensible thing to do in the\nfirst place, but ...\n\n>  \n> -git_version=\"$(git --version | sed \"s/.* //\")\"\n> +git_version=\"$(git --version | sed \"s/git version //\")\"\n>  \n\n... this is good, simply because in help.c::cmd_version() we see\n\n        int cmd_version(int argc, const char **argv, const char *prefix)\n        {\n                ...\n                printf(\"git version %s\\n\", git_version_string);\n\ni.e. no matter how heavily modified git_version_string[] is, we will\nalways show \"git version\" at the beginning (unless a builder goes\none step further to customize the version string by modifying the\nsource, at which point all bets are off).\n\nTo save reviewers and readers from wasting time wondering what\nhappens when a company, which is even less reasonable than Apple,\nmodifies the version number to include \"git version\" in it, the\nupdated sed expression probably should anchor the pattern to the\nleft edge to clarify the intention, even though it would not make\nany difference in practice, i.e.\n\n\tsed 's/^git version //'\n\n"},{"id":"368065","messageId":"xmqqsgxb5ard.fsf@gitster-ct.c.googlers.com","threadId":"50352","inReplyTo":"20190129193818.8645-8-jeremyhu@apple.com","subject":"Re: [PATCH (Apple Git) 07/13] HTML documentation is not provided with Apple's git. Make the error message more on point.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-01-29T23:01:26Z","receivedAt":"2019-01-29T23:01:30Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeremy Huddleston Sequoia <jeremyhu@apple.com> writes:\n\n> Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>\n> ---\n>  builtin/help.c | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/builtin/help.c b/builtin/help.c\n> index 7739a5c155..e001b6157c 100644\n> --- a/builtin/help.c\n> +++ b/builtin/help.c\n> @@ -383,7 +383,7 @@ static void get_html_page_path(struct strbuf *page_path, const char *page)\n>  \tif (!strstr(html_path, \"://\")) {\n>  \t\tif (stat(mkpath(\"%s/git.html\", html_path), &st)\n>  \t\t    || !S_ISREG(st.st_mode))\n> -\t\t\tdie(\"'%s': not a documentation directory.\", html_path);\n> +\t\t\tdie(\"HTML documentation is not provided by this distribution of git.\");\n\nMentioning HTML in the message may be a good idea, but I feel that\n\"distribution of git\" is not something we should say in the source\nfor those who are building from the source.  Distributors are free\nto munge before they generate their binary distribution, of course\n;-).\n\n>  \t}\n>  \n>  \tstrbuf_init(page_path, 0);\n"},{"id":"368068","messageId":"xmqqo97z5ac9.fsf@gitster-ct.c.googlers.com","threadId":"50352","inReplyTo":"20190129193818.8645-13-jeremyhu@apple.com","subject":"Re: [PATCH (Apple Git) 12/13] Enable support for Xcode.app-bundled gitconfig","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-01-29T23:10:30Z","receivedAt":"2019-01-29T23:10:36Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeremy Huddleston Sequoia <jeremyhu@apple.com> writes:\n\n> Useful for setting up osxkeychain in Xcode.app's gitconfig\n>\n> Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>\n> ---\n\nA concern shared with 13/13 is this.\n\nWhile it may not hurt too much to look at one extra location even on\nnon-Apple platform, it probably is a mistake to have this xcode\nspecific change in generic part of the system like config.c or\nattr.c.  For that matter, would it make sense to force Apple uses to\nlook at one extra location in the first place?  In other words, we\nalready have \"system wide\" location (i.e. system_path(ETC_GITCONFIG))\ndefined so system owners can give reasonable default to its users.\nThe value of not using that facility and instead adding yet another\nplace is dubious.\n\n\n  \n\n\n\n\n>  config.c | 13 +++++++++++++\n>  config.h |  2 ++\n>  2 files changed, 15 insertions(+)\n>\n> diff --git a/config.c b/config.c\n> index ff521eb27a..656bfef8ab 100644\n> --- a/config.c\n> +++ b/config.c\n> @@ -1631,6 +1631,14 @@ const char *git_etc_gitconfig(void)\n>  \treturn system_wide;\n>  }\n>  \n> +const char *git_xcode_gitconfig(void)\n> +{\n> +\tstatic const char *xcode_config;\n> +\tif (!xcode_config)\n> +\t\txcode_config = system_path(\"share/git-core/gitconfig\");\n> +\treturn xcode_config;\n> +}\n> +\n>  /*\n>   * Parse environment variable 'k' as a boolean (in various\n>   * possible spellings); if missing, use the default value 'def'.\n> @@ -1673,6 +1681,11 @@ static int do_git_config_sequence(const struct config_options *opts,\n>  \telse\n>  \t\trepo_config = NULL;\n>  \n> +\tcurrent_parsing_scope = CONFIG_SCOPE_XCODE;\n> +\tif (git_config_system() && git_xcode_gitconfig() && !access_or_die(git_xcode_gitconfig(), R_OK, 0))\n> +\t\tret += git_config_from_file(fn, git_xcode_gitconfig(),\n> +\t\t\t\t\t    data);\n> +\n>  \tcurrent_parsing_scope = CONFIG_SCOPE_SYSTEM;\n>  \tif (git_config_system() && !access_or_die(git_etc_gitconfig(), R_OK, 0))\n>  \t\tret += git_config_from_file(fn, git_etc_gitconfig(),\n> diff --git a/config.h b/config.h\n> index ee5d3fa7b4..f848423d28 100644\n> --- a/config.h\n> +++ b/config.h\n> @@ -115,6 +115,7 @@ extern int git_config_rename_section_in_file(const char *, const char *, const c\n>  extern int git_config_copy_section(const char *, const char *);\n>  extern int git_config_copy_section_in_file(const char *, const char *, const char *);\n>  extern const char *git_etc_gitconfig(void);\n> +extern const char *git_xcode_gitconfig(void);\n>  extern int git_env_bool(const char *, int);\n>  extern unsigned long git_env_ulong(const char *, unsigned long);\n>  extern int git_config_system(void);\n> @@ -131,6 +132,7 @@ enum config_scope {\n>  \tCONFIG_SCOPE_GLOBAL,\n>  \tCONFIG_SCOPE_REPO,\n>  \tCONFIG_SCOPE_CMDLINE,\n> +\tCONFIG_SCOPE_XCODE,\n>  };\n>  \n>  extern enum config_scope current_config_scope(void);\n"},{"id":"368069","messageId":"xmqqk1in5a9q.fsf@gitster-ct.c.googlers.com","threadId":"50352","inReplyTo":"20190129193818.8645-12-jeremyhu@apple.com","subject":"Re: [PATCH (Apple Git) 11/13] Fix problem found from running the test suite.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-01-29T23:12:01Z","receivedAt":"2019-01-29T23:12:06Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"[jc: just forwarding to the area expert]\n\nJeremy Huddleston Sequoia <jeremyhu@apple.com> writes:\n\n> From: Matt Wright <mww@apple.com>\n>\n> Signed-off-by: Matt Wright <mww@apple.com>\n> ---\n>  git-svn.perl | 30 ++++++++++++++++++++++++++++++\n>  1 file changed, 30 insertions(+)\n>\n> diff --git a/git-svn.perl b/git-svn.perl\n> index 050f2a36f4..d29730be3b 100755\n> --- a/git-svn.perl\n> +++ b/git-svn.perl\n> @@ -1815,6 +1815,36 @@ sub complete_url_ls_init {\n>  \n>  sub verify_ref {\n>  \tmy ($ref) = @_;\n> +\n> +\tif ($ref =~ /^(.*)\\^0$/) {\n> +\t\tmy $baseref = $1;\n> +\t\tmy $p = \"$ENV{GIT_DIR}/$baseref\";\n> +\t\t$p = \"$ENV{GIT_DIR}/refs/remotes/$baseref\" unless -e $p;\n> +\t\t$p = \"$ENV{GIT_DIR}/refs/$baseref\" unless -e $p;\n> +\t\t$p = \"$ENV{GIT_DIR}/refs/heads/$baseref\" unless -e $p;\n> +\n> +\t\tmy $resolved = undef;\n> +\t\tif (-e $p) {\n> +\t\t\topen FH, $p;\n> +\t\t\t$resolved = <FH>;\n> +\t\t\tchomp $resolved;\n> +\t\t\tclose FH;\n> +\t\t} elsif (-e \"$ENV{GIT_DIR}/packed-refs\") {\n> +\t\t\topen FH, \"$ENV{GIT_DIR}/packed-refs\";\n> +\t\t\twhile (<FH>) {\n> +\t\t\t\tif ($_ =~ /^([0-9a-fA-F]+) ((refs\\/)?(remotes\\/|heads\\/|\\/)?$baseref)$/) {\n> +\t\t\t\t\t$resolved = $1;\n> +\t\t\t\t\tlast;\n> +\t\t\t\t}\n> +\t\t\t}\n> +\t\t}\n> +\n> +\t\tif (defined($resolved)) {\n> +\t\t\treturn verify_ref(\"$1^0\") if $resolved =~ /^ref: (.*)$/;\n> +\t\t\treturn $resolved\n> +\t\t}\n> +\t}\n> +\n>  \teval { command_oneline([ 'rev-parse', '--verify', $ref ],\n>  \t                       { STDERR => 0 }); };\n>  }\n"},{"id":"368071","messageId":"20190129233049.65gxzl57qtxv6ebq@dcvr","threadId":"50352","inReplyTo":"20190129193818.8645-12-jeremyhu@apple.com","subject":"Re: [PATCH (Apple Git) 11/13] Fix problem found from running the test suite.","fromName":"Eric Wong","fromEmail":"e@80x24.org","sentAt":"2019-01-29T23:30:49Z","receivedAt":"2019-01-29T23:30:51Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Jeremy Huddleston Sequoia <jeremyhu@apple.com> wrote:\n> From: Matt Wright <mww@apple.com>\n> \n> Signed-off-by: Matt Wright <mww@apple.com>\n\nHi Jeremy/Matt: I expect to see a description of said \"problem\"\n\nMore comments inline below...\n\n> diff --git a/git-svn.perl b/git-svn.perl\n> index 050f2a36f4..d29730be3b 100755\n> --- a/git-svn.perl\n> +++ b/git-svn.perl\n> @@ -1815,6 +1815,36 @@ sub complete_url_ls_init {\n>  \n>  sub verify_ref {\n>  \tmy ($ref) = @_;\n> +\n> +\tif ($ref =~ /^(.*)\\^0$/) {\n> +\t\tmy $baseref = $1;\n> +\t\tmy $p = \"$ENV{GIT_DIR}/$baseref\";\n> +\t\t$p = \"$ENV{GIT_DIR}/refs/remotes/$baseref\" unless -e $p;\n> +\t\t$p = \"$ENV{GIT_DIR}/refs/$baseref\" unless -e $p;\n> +\t\t$p = \"$ENV{GIT_DIR}/refs/heads/$baseref\" unless -e $p;\n\nOK, this looks like we're reproducing rev-parse functionality...\n\n> +\t\tmy $resolved = undef;\n> +\t\tif (-e $p) {\n> +\t\t\topen FH, $p;\n> +\t\t\t$resolved = <FH>;\n> +\t\t\tchomp $resolved;\n> +\t\t\tclose FH;\n> +\t\t} elsif (-e \"$ENV{GIT_DIR}/packed-refs\") {\n> +\t\t\topen FH, \"$ENV{GIT_DIR}/packed-refs\";\n> +\t\t\twhile (<FH>) {\n> +\t\t\t\tif ($_ =~ /^([0-9a-fA-F]+) ((refs\\/)?(remotes\\/|heads\\/|\\/)?$baseref)$/) {\n> +\t\t\t\t\t$resolved = $1;\n> +\t\t\t\t\tlast;\n> +\t\t\t\t}\n> +\t\t\t}\n\nAnd even more so...   This would be a pain to maintain with\nproposed changes to ref storage (reftable/lmdb/...), so I really\ndon't want to reproduce rev-parse functionality in Perl.\n\nBut while we're in Perl; prefer something like:\n\n\tm!^([0-9a-f]+) ((refs/)?(remotes/|heads/|/)?$baseref)$!\n\nSo you don't have to escape '/' (leaning-toothpick syndrome) by\nusing m!$REGEX!.  You can also skip the unnecessary [A-F] match.\n\n> +\t\t}\n> +\n> +\t\tif (defined($resolved)) {\n> +\t\t\treturn verify_ref(\"$1^0\") if $resolved =~ /^ref: (.*)$/;\n> +\t\t\treturn $resolved\n> +\t\t}\n> +\t}\n\nSo without more details, we really need an explanation of why\nthis patch was made.  The test suite has been thousands of times\nover the years on other platforms without changes to the\nverify_ref() sub.\n\n>  \teval { command_oneline([ 'rev-parse', '--verify', $ref ],\n>  \t                       { STDERR => 0 }); };\n>  }\n"},{"id":"368073","messageId":"09281A61-1EDA-4226-AD59-6A97EDF1B1DB@apple.com","threadId":"50352","inReplyTo":"xmqq1s4v6pzm.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH (Apple Git) 02/13] test-lib: Export PERL5LIB for testing git-svn","fromName":"Jeremy Huddleston Sequoia","fromEmail":"jeremyhu@apple.com","sentAt":"2019-01-29T23:46:07Z","receivedAt":"2019-01-29T23:47:28Z","isPatch":true,"sender":{"key":"jeremyhu@apple.com","avatar":"https://avatars.githubusercontent.com/u/1258676?v=4"},"body":"\n\n> On Jan 29, 2019, at 2:47 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> \n> Jeremy Huddleston Sequoia <jeremyhu@apple.com> writes:\n> \n>> Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>\n>> ---\n>> t/test-lib.sh | 3 +++\n>> 1 file changed, 3 insertions(+)\n> \n> This obviously won't be acceptable as-is to my tree.  Shouldn't this\n> be something to be dealt with in config.mak.uname or something that\n> is meant to define platform-specific customization?\n\nThe issue here is that we're not locating relocatable perl modules during testing.  This is a general problem with testing RUNTIME_PREFIX configurations, and a more general solution to this sledgehammer would be appropriate.  I don't think config.mak.uname really makes sense since it's a general RUNTIME_PREFIX issue and not specifically a darwin issue.\n\n> \n>> \n>> diff --git a/t/test-lib.sh b/t/test-lib.sh\n>> index 0f1faa24b2..4060a53f56 100644\n>> --- a/t/test-lib.sh\n>> +++ b/t/test-lib.sh\n>> @@ -1017,6 +1017,9 @@ fi\n>> \n>> GITPERLLIB=\"$GIT_BUILD_DIR\"/perl/build/lib\n>> export GITPERLLIB\n>> +PERL_VERSION=$(grep DEFAULT /usr/local/versioner/perl/versions | sed 's:^.*= *\\([^ ]*\\)$:\\1:')\n>> +PERL5LIB=\"$GIT_BUILD_DIR\"/perl:\"$(xcode-select -p)\"/Library/Perl/$PERL_VERSION\n>> +export PERL5LIB\n>> test -d \"$GIT_BUILD_DIR\"/templates/blt || {\n>> \terror \"You haven't built things yet, have you?\"\n>> }\n\n"},{"id":"368074","messageId":"7A37A7C1-6B82-44F8-AECB-189A57B94FBD@apple.com","threadId":"50352","inReplyTo":"xmqqo97z5ac9.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH (Apple Git) 12/13] Enable support for Xcode.app-bundled gitconfig","fromName":"Jeremy Huddleston Sequoia","fromEmail":"jeremyhu@apple.com","sentAt":"2019-01-29T23:51:45Z","receivedAt":"2019-01-29T23:52:35Z","isPatch":true,"sender":{"key":"jeremyhu@apple.com","avatar":"https://avatars.githubusercontent.com/u/1258676?v=4"},"body":"\n\n> On Jan 29, 2019, at 3:10 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> \n> Jeremy Huddleston Sequoia <jeremyhu@apple.com> writes:\n> \n>> Useful for setting up osxkeychain in Xcode.app's gitconfig\n>> \n>> Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>\n>> ---\n> \n> A concern shared with 13/13 is this.\n> \n> While it may not hurt too much to look at one extra location even on\n> non-Apple platform, it probably is a mistake to have this xcode\n> specific change in generic part of the system like config.c or\n> attr.c.  For that matter, would it make sense to force Apple uses to\n> look at one extra location in the first place?  In other words, we\n> already have \"system wide\" location (i.e. system_path(ETC_GITCONFIG))\n> defined so system owners can give reasonable default to its users.\n> The value of not using that facility and instead adding yet another\n> place is dubious.\n\nThis allows for per-distribution configuration and could be useful for other applications as well that want customizations specific to their install of git.  For our specific use case, we do not want to munge the system policy when installing Xcode.  Prior to doing things this way, we were just changing the default in our distributed git binary, but this seems a bit more flexible.\n\n> \n> \n> \n> \n> \n> \n> \n>> config.c | 13 +++++++++++++\n>> config.h |  2 ++\n>> 2 files changed, 15 insertions(+)\n>> \n>> diff --git a/config.c b/config.c\n>> index ff521eb27a..656bfef8ab 100644\n>> --- a/config.c\n>> +++ b/config.c\n>> @@ -1631,6 +1631,14 @@ const char *git_etc_gitconfig(void)\n>> \treturn system_wide;\n>> }\n>> \n>> +const char *git_xcode_gitconfig(void)\n>> +{\n>> +\tstatic const char *xcode_config;\n>> +\tif (!xcode_config)\n>> +\t\txcode_config = system_path(\"share/git-core/gitconfig\");\n>> +\treturn xcode_config;\n>> +}\n>> +\n>> /*\n>>  * Parse environment variable 'k' as a boolean (in various\n>>  * possible spellings); if missing, use the default value 'def'.\n>> @@ -1673,6 +1681,11 @@ static int do_git_config_sequence(const struct config_options *opts,\n>> \telse\n>> \t\trepo_config = NULL;\n>> \n>> +\tcurrent_parsing_scope = CONFIG_SCOPE_XCODE;\n>> +\tif (git_config_system() && git_xcode_gitconfig() && !access_or_die(git_xcode_gitconfig(), R_OK, 0))\n>> +\t\tret += git_config_from_file(fn, git_xcode_gitconfig(),\n>> +\t\t\t\t\t    data);\n>> +\n>> \tcurrent_parsing_scope = CONFIG_SCOPE_SYSTEM;\n>> \tif (git_config_system() && !access_or_die(git_etc_gitconfig(), R_OK, 0))\n>> \t\tret += git_config_from_file(fn, git_etc_gitconfig(),\n>> diff --git a/config.h b/config.h\n>> index ee5d3fa7b4..f848423d28 100644\n>> --- a/config.h\n>> +++ b/config.h\n>> @@ -115,6 +115,7 @@ extern int git_config_rename_section_in_file(const char *, const char *, const c\n>> extern int git_config_copy_section(const char *, const char *);\n>> extern int git_config_copy_section_in_file(const char *, const char *, const char *);\n>> extern const char *git_etc_gitconfig(void);\n>> +extern const char *git_xcode_gitconfig(void);\n>> extern int git_env_bool(const char *, int);\n>> extern unsigned long git_env_ulong(const char *, unsigned long);\n>> extern int git_config_system(void);\n>> @@ -131,6 +132,7 @@ enum config_scope {\n>> \tCONFIG_SCOPE_GLOBAL,\n>> \tCONFIG_SCOPE_REPO,\n>> \tCONFIG_SCOPE_CMDLINE,\n>> +\tCONFIG_SCOPE_XCODE,\n>> };\n>> \n>> extern enum config_scope current_config_scope(void);\n\n"},{"id":"368076","messageId":"20190129235947.GG13764@szeder.dev","threadId":"50352","inReplyTo":"09281A61-1EDA-4226-AD59-6A97EDF1B1DB@apple.com","subject":"Re: [PATCH (Apple Git) 02/13] test-lib: Export PERL5LIB for testing git-svn","fromName":"SZEDER Gábor","fromEmail":"szeder.dev@gmail.com","sentAt":"2019-01-29T23:59:47Z","receivedAt":"2019-01-29T23:59:54Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"On Tue, Jan 29, 2019 at 03:46:07PM -0800, Jeremy Huddleston Sequoia wrote:\n> \n> \n> > On Jan 29, 2019, at 2:47 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> > \n> > Jeremy Huddleston Sequoia <jeremyhu@apple.com> writes:\n> > \n> >> Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>\n> >> ---\n> >> t/test-lib.sh | 3 +++\n> >> 1 file changed, 3 insertions(+)\n> > \n> > This obviously won't be acceptable as-is to my tree.  Shouldn't this\n> > be something to be dealt with in config.mak.uname or something that\n> > is meant to define platform-specific customization?\n> \n> The issue here is that we're not locating relocatable perl modules\n> during testing.  This is a general problem with testing\n> RUNTIME_PREFIX configurations, and a more general solution to this\n> sledgehammer would be appropriate.  I don't think config.mak.uname\n> really makes sense since it's a general RUNTIME_PREFIX issue and not\n> specifically a darwin issue.\n\nBut this patch is very darwin-specific ...\n\n> >> diff --git a/t/test-lib.sh b/t/test-lib.sh\n> >> index 0f1faa24b2..4060a53f56 100644\n> >> --- a/t/test-lib.sh\n> >> +++ b/t/test-lib.sh\n> >> @@ -1017,6 +1017,9 @@ fi\n> >> \n> >> GITPERLLIB=\"$GIT_BUILD_DIR\"/perl/build/lib\n> >> export GITPERLLIB\n> >> +PERL_VERSION=$(grep DEFAULT /usr/local/versioner/perl/versions | sed 's:^.*= *\\([^ ]*\\)$:\\1:')\n> >> +PERL5LIB=\"$GIT_BUILD_DIR\"/perl:\"$(xcode-select -p)\"/Library/Perl/$PERL_VERSION\n\n... because what other platforms could possibly have 'xcode-select'\ninstalled!?  Consequently:\n\n  $ ./t0000-basic.sh \n  grep: /usr/local/versioner/perl/versions: No such file or directory\n  ./t0000-basic.sh: 1154: ./test-lib.sh: xcode-select: not found\n  ok 1 - verify that the running shell supports \"local\"\n  ok 2 - .git/objects should be empty after git init in an empty repo\n  ok 3 - .git/objects should have 3 subdirectories\n  ok 4 - success is reported like this\n  not ok 5 - pretend we have a fully passing test suite\n  <...>\n  # failed 29 among 82 test(s)\n\n\n\n> >> +export PERL5LIB\n> >> test -d \"$GIT_BUILD_DIR\"/templates/blt || {\n> >> \terror \"You haven't built things yet, have you?\"\n> >> }\n> \n"},{"id":"368077","messageId":"20C7B5F4-58DA-43E4-9332-B206C0D070F0@apple.com","threadId":"50352","inReplyTo":"20190129235947.GG13764@szeder.dev","subject":"Re: [PATCH (Apple Git) 02/13] test-lib: Export PERL5LIB for testing git-svn","fromName":"Jeremy Sequoia","fromEmail":"jeremyhu@apple.com","sentAt":"2019-01-30T00:01:23Z","receivedAt":"2019-01-30T00:01:32Z","isPatch":true,"sender":{"key":"jeremyhu@apple.com","avatar":"https://avatars.githubusercontent.com/u/1258676?v=4"},"body":"\n\nSent from my iPhone...\n\n> On Jan 29, 2019, at 15:59, SZEDER Gábor <szeder.dev@gmail.com> wrote:\n> \n>> On Tue, Jan 29, 2019 at 03:46:07PM -0800, Jeremy Huddleston Sequoia wrote:\n>> \n>> \n>>> On Jan 29, 2019, at 2:47 PM, Junio C Hamano <gitster@pobox.com> wrote:\n>>> \n>>> Jeremy Huddleston Sequoia <jeremyhu@apple.com> writes:\n>>> \n>>>> Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>\n>>>> ---\n>>>> t/test-lib.sh | 3 +++\n>>>> 1 file changed, 3 insertions(+)\n>>> \n>>> This obviously won't be acceptable as-is to my tree.  Shouldn't this\n>>> be something to be dealt with in config.mak.uname or something that\n>>> is meant to define platform-specific customization?\n>> \n>> The issue here is that we're not locating relocatable perl modules\n>> during testing.  This is a general problem with testing\n>> RUNTIME_PREFIX configurations, and a more general solution to this\n>> sledgehammer would be appropriate.  I don't think config.mak.uname\n>> really makes sense since it's a general RUNTIME_PREFIX issue and not\n>> specifically a darwin issue.\n> \n> But this patch is very darwin-specific ...\n> \n>>>> diff --git a/t/test-lib.sh b/t/test-lib.sh\n>>>> index 0f1faa24b2..4060a53f56 100644\n>>>> --- a/t/test-lib.sh\n>>>> +++ b/t/test-lib.sh\n>>>> @@ -1017,6 +1017,9 @@ fi\n>>>> \n>>>> GITPERLLIB=\"$GIT_BUILD_DIR\"/perl/build/lib\n>>>> export GITPERLLIB\n>>>> +PERL_VERSION=$(grep DEFAULT /usr/local/versioner/perl/versions | sed 's:^.*= *\\([^ ]*\\)$:\\1:')\n>>>> +PERL5LIB=\"$GIT_BUILD_DIR\"/perl:\"$(xcode-select -p)\"/Library/Perl/$PERL_VERSION\n> \n> ... because what other platforms could possibly have 'xcode-select'\n> installed!?  Consequently:\n> \n>  $ ./t0000-basic.sh \n>  grep: /usr/local/versioner/perl/versions: No such file or directory\n>  ./t0000-basic.sh: 1154: ./test-lib.sh: xcode-select: not found\n>  ok 1 - verify that the running shell supports \"local\"\n>  ok 2 - .git/objects should be empty after git init in an empty repo\n>  ok 3 - .git/objects should have 3 subdirectories\n>  ok 4 - success is reported like this\n>  not ok 5 - pretend we have a fully passing test suite\n>  <...>\n>  # failed 29 among 82 test(s)\n\nYes.  This is one of the patches that I said in the 00 message would certainly not be upstreamable but for which we should find a general solution to the problem if one is available.\n\n> \n> \n> \n>>>> +export PERL5LIB\n>>>> test -d \"$GIT_BUILD_DIR\"/templates/blt || {\n>>>>    error \"You haven't built things yet, have you?\"\n>>>> }\n>> \n"},{"id":"368078","messageId":"CAPUEsphfxcqjkqRSV8soCBEtC20Q8+wjYz6_zbKM0=SpsSxTSg@mail.gmail.com","threadId":"50352","inReplyTo":"20190129235947.GG13764@szeder.dev","subject":"Re: [PATCH (Apple Git) 02/13] test-lib: Export PERL5LIB for testing git-svn","fromName":"Carlo Arenas","fromEmail":"carenas@gmail.com","sentAt":"2019-01-30T00:07:36Z","receivedAt":"2019-01-30T00:07:50Z","isPatch":true,"sender":{"key":"carenas@gmail.com","avatar":"https://avatars.githubusercontent.com/u/76036?v=4"},"body":"/usr/local/versioner/perl/versions is also not provided with macOS or\nXcode AFAIK\n\nCarlo\n"},{"id":"368083","messageId":"20190130094437.GB24387@genre.crustytoothpaste.net","threadId":"50352","inReplyTo":"xmqqo97z5ac9.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH (Apple Git) 12/13] Enable support for Xcode.app-bundled gitconfig","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2019-01-30T09:44:38Z","receivedAt":"2019-01-30T09:44:46Z","isPatch":true,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On Tue, Jan 29, 2019 at 03:10:30PM -0800, Junio C Hamano wrote:\n> Jeremy Huddleston Sequoia <jeremyhu@apple.com> writes:\n> \n> > Useful for setting up osxkeychain in Xcode.app's gitconfig\n> >\n> > Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>\n> > ---\n> \n> A concern shared with 13/13 is this.\n> \n> While it may not hurt too much to look at one extra location even on\n> non-Apple platform, it probably is a mistake to have this xcode\n> specific change in generic part of the system like config.c or\n> attr.c.  For that matter, would it make sense to force Apple uses to\n> look at one extra location in the first place?  In other words, we\n> already have \"system wide\" location (i.e. system_path(ETC_GITCONFIG))\n> defined so system owners can give reasonable default to its users.\n> The value of not using that facility and instead adding yet another\n> place is dubious.\n\nI think it's relevant in this case if I point out what the gitconfig and\ngitattributes files contain on macOS. The gitconfig file sets up the\ndefault credential helper, and the gitattributes file sets up default\ndiff helpers for Objective C and Swift.\n\nTo my knowledge, I believe what other distributors (including Homebrew)\ndo is they provide the system configuration file with default options if\none is missing, allowing the user to retain or delete these options as\nthe administrator sees fit. Apple may or may not want to do that, but I\nbelieve that's probably the way that we'll choose to support.\n\nWhile distributors will of course customize Git in whatever way seems\nmost appropriate, I think it's better if those customizations are\neditable by the user, since that makes it easier to write per-user\nconfiguration files that are consistent across platforms. For a tool\nlike Git, that can be quite helpful.\n-- \nbrian m. carlson: Houston, Texas, US\nOpenPGP: https://keybase.io/bk2204\n"},{"id":"368104","messageId":"20190130095006.GC24387@genre.crustytoothpaste.net","threadId":"50352","inReplyTo":"20190129193818.8645-10-jeremyhu@apple.com","subject":"Re: [PATCH (Apple Git) 09/13] Use symbolic links rather than hard links for files in libexec","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2019-01-30T09:50:06Z","receivedAt":"2019-01-30T09:50:15Z","isPatch":true,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On Tue, Jan 29, 2019 at 11:38:15AM -0800, Jeremy Huddleston Sequoia wrote:\n> See <rdar://problem/10573201>\n\nIt's my understanding that Radars aren't public. Could you summarize the\nreasons behind this change in the commit message for those of us who\ndon't have access to view this issue?\n-- \nbrian m. carlson: Houston, Texas, US\nOpenPGP: https://keybase.io/bk2204\n"},{"id":"368109","messageId":"CAPig+cSkm-M7fP=KLOCO5J8OSYCEyjy950AM=VzTnP9C6AcKxw@mail.gmail.com","threadId":"50352","inReplyTo":"20190129193818.8645-2-jeremyhu@apple.com","subject":"Re: [PATCH (Apple Git) 01/13] .gitignore: Remove *.s as it matches *.S on case insensitive filesystem","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2019-01-30T11:33:12Z","receivedAt":"2019-01-30T11:33:25Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Tue, Jan 29, 2019 at 3:11 PM Jeremy Huddleston Sequoia\n<jeremyhu@apple.com> wrote:\n> This was causing problems with ppc/sha1ppc.S\n\nWhat problems, exactly?\n\n> Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>\n> ---\n> diff --git a/.gitignore b/.gitignore\n> @@ -195,7 +195,7 @@\n> -*.[aos]\n> +*.[ao]\n"},{"id":"368110","messageId":"534F20EC-2B29-46C3-BAD9-3CBE7312257F@apple.com","threadId":"50352","inReplyTo":"CAPig+cSkm-M7fP=KLOCO5J8OSYCEyjy950AM=VzTnP9C6AcKxw@mail.gmail.com","subject":"Re: [PATCH (Apple Git) 01/13] .gitignore: Remove *.s as it matches *.S on case insensitive filesystem","fromName":"Jeremy Huddleston Sequoia","fromEmail":"jeremyhu@apple.com","sentAt":"2019-01-30T11:37:18Z","receivedAt":"2019-01-30T11:37:27Z","isPatch":true,"sender":{"key":"jeremyhu@apple.com","avatar":"https://avatars.githubusercontent.com/u/1258676?v=4"},"body":"\n\n> On Jan 30, 2019, at 03:33, Eric Sunshine <sunshine@sunshineco.com> wrote:\n> \n> On Tue, Jan 29, 2019 at 3:11 PM Jeremy Huddleston Sequoia\n> <jeremyhu@apple.com> wrote:\n>> This was causing problems with ppc/sha1ppc.S\n> \n> What problems, exactly?\n\nThe file is ignored, but it shouldn't be.\n\n> \n>> Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>\n>> ---\n>> diff --git a/.gitignore b/.gitignore\n>> @@ -195,7 +195,7 @@\n>> -*.[aos]\n>> +*.[ao]\n\n"},{"id":"368112","messageId":"230CA858-D709-4142-9563-20A4887F2ED8@apple.com","threadId":"50352","inReplyTo":"20190130095006.GC24387@genre.crustytoothpaste.net","subject":"Re: [PATCH (Apple Git) 09/13] Use symbolic links rather than hard links for files in libexec","fromName":"Jeremy Huddleston Sequoia","fromEmail":"jeremyhu@apple.com","sentAt":"2019-01-30T11:41:06Z","receivedAt":"2019-01-30T11:41:17Z","isPatch":true,"sender":{"key":"jeremyhu@apple.com","avatar":"https://avatars.githubusercontent.com/u/1258676?v=4"},"body":"\n\n> On Jan 30, 2019, at 01:50, brian m. carlson <sandals@crustytoothpaste.net> wrote:\n> \n> On Tue, Jan 29, 2019 at 11:38:15AM -0800, Jeremy Huddleston Sequoia wrote:\n>> See <rdar://problem/10573201>\n> \n> It's my understanding that Radars aren't public. Could you summarize the\n> reasons behind this change in the commit message for those of us who\n> don't have access to view this issue?\n\nThere was a bug in some tool in our packaging pipeline that resulted in hardlinks not being preserved.  That was fixed, but I decided to leave these as symlinks anyways in case users did a file operation on Xcode.app that didn't preserve hard links.\n\nThe point here is that it would probably be nice to have hard vs soft be a configuration option.\n"},{"id":"368113","messageId":"CAPig+cR_p9ybUjfSqY_Kod39Ztxt9Y7Js=QvFU-WDJh58sb5Yg@mail.gmail.com","threadId":"50352","inReplyTo":"20190129193818.8645-4-jeremyhu@apple.com","subject":"Re: [PATCH (Apple Git) 03/13] t0500: New regression test for git add of a path that contains a .git directory","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2019-01-30T11:47:41Z","receivedAt":"2019-01-30T11:47:55Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Tue, Jan 29, 2019 at 4:19 PM Jeremy Huddleston Sequoia\n<jeremyhu@apple.com> wrote:\n> Subject: t0500: New regression test for git add of a path that contains a .git directory\n\nPlease describe the actual problem here in the commit message so\nreaders of this change can understand what this is all about.\n\n> Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>\n> ---\n> diff --git a/t/t0500-apple.sh b/t/t0500-apple.sh\n> @@ -0,0 +1,40 @@\n> +#!/bin/sh\n> +#\n> +# Copyright (c) 2012-2016 Apple Inc.\n> +#\n> +# Tests for regressions found by Apple Inc. for issues that upstream does not\n> +# want to fix or accept tests for.\n\nThis is an odd comment for a patch which is intended to be upstreamed.\n\n> +test_description='Apple Inc. specific tests'\n\nIs this script actually specific to Apple? If not, a better\ndescription is likely warranted. Alternatively, place this new test in\nan appropriate existing test script.\n\n> +# <rdar://problem/10238070>\n\nInaccessible private bug report. Please describe the actual regression here.\n\n> +# This test case addresses a regression introduced between v1.7.3 and v1.7.5\n> +# git bisect good v1.7.3\n> +# git bisect bad v1.7.5\n> +# ...\n> +# found 18e051a3981f38db08521bb61ccf7e4571335353\n\nThis commentary isn't very useful going forward, thus not worth having\nin the script itself, although it may make useful information for the\ncommit message (though more likely not). Usually, such commentary\nwould be placed below the \"---\" line just under your sign-off.\n\n> +test_expect_success '<rdar://problem/10238070> -- git add of a path that contains a .git directory' '\n\nAs above, a better title would be welcome, one which actually means\nsomething to people without access to the private bug report.\n\n> +       rm -rf .git &&\n> +       mkdir -p orig/sub/dir/otherdir &&\n> +       cd orig/sub &&\n\nWe don't 'cd' around inside tests without ensuring that the 'cd' is\nundone automatically even if the test fails. (See below.)\n\n> +       echo \"1\" > dir/file &&\n> +       echo \"2\" > dir/otherdir/file &&\n> +       git init --quiet &&\n\nWhy --quiet? Output generated by commands is already suppressed by\ndefault when the test is run normally, but it is useful to have when\nsomething goes wrong, so we don't usually want to suppress it\nmanually. Same comment applies to >/dev/null redirects.\n\n> +       git add -A &&\n> +       git commit -m \"Initial Commit\" --quiet &&\n> +       cd - > /dev/null &&\n\nIf something fails above this point, then this \"cd -\" will never\nexecute, so any tests which get added below this one in the script\nwill operate in the wrong directory. The normal way to 'cd' within a\ntest is within a subshell so the 'cd' is undone automatically whether\nthe test fails or not:\n\n    (\n        cd orig/sub\n        ...\n    )\n\n> +       git init --bare --quiet \"${TESTROOT}/git_dir.git\" &&\n> +       git --git-dir=\"${TESTROOT}/git_dir.git\" --work-tree=/ add -f -- \"${TESTROOT}/orig/sub/\" &&\n> +       git --git-dir=\"${TESTROOT}/git_dir.git\" --work-tree=/ add -f -- \"${TESTROOT}/orig/\" &&\n> +       git --git-dir=\"${TESTROOT}/git_dir.git\" --work-tree=/ commit -m \"Commit.\" |\n> +               grep -q \"2 files changed, 2 insertions\"\n> +'\n\nWe don't normally place a Git command upstream of a pipe since its\nexit status will get swallowed by the pipe, thus potentially losing\nimportant information. Instead, redirect the command output to a file\nand 'grep' on the file.\n\nAlso, the string you're grepping is likely to be localized, so use\ntest_i18ngrep() instead.\n"},{"id":"368124","messageId":"CAPig+cSwMpTY0StCYBaF+oreZebyOUqFRqj1ABukHkdLY9PyEw@mail.gmail.com","threadId":"50352","inReplyTo":"534F20EC-2B29-46C3-BAD9-3CBE7312257F@apple.com","subject":"Re: [PATCH (Apple Git) 01/13] .gitignore: Remove *.s as it matches *.S on case insensitive filesystem","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2019-01-30T12:29:51Z","receivedAt":"2019-01-30T12:30:04Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Wed, Jan 30, 2019 at 6:37 AM Jeremy Huddleston Sequoia\n<jeremyhu@apple.com> wrote:\n> > On Jan 30, 2019, at 03:33, Eric Sunshine <sunshine@sunshineco.com> wrote:\n> > On Tue, Jan 29, 2019 at 3:11 PM Jeremy Huddleston Sequoia\n> > <jeremyhu@apple.com> wrote:\n> >> This was causing problems with ppc/sha1ppc.S\n> >\n> > What problems, exactly?\n>\n> The file is ignored, but it shouldn't be.\n\nBut what problem are you experiencing, exactly? .gitignore rules do\nnot impact tracked files such as ppc/sha1ppc.S, even if the name\nmatches an ignore-rule, so it's not clear what problem you're trying\nto solve.\n"},{"id":"368125","messageId":"CAPig+cSFs-c_--rkf-sqx0a5Ern0GTO4K8_K97ca_6bNcxNc9Q@mail.gmail.com","threadId":"50352","inReplyTo":"CAPig+cSwMpTY0StCYBaF+oreZebyOUqFRqj1ABukHkdLY9PyEw@mail.gmail.com","subject":"Re: [PATCH (Apple Git) 01/13] .gitignore: Remove *.s as it matches *.S on case insensitive filesystem","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2019-01-30T12:32:42Z","receivedAt":"2019-01-30T12:32:55Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Wed, Jan 30, 2019 at 7:29 AM Eric Sunshine <sunshine@sunshineco.com> wrote:\n> On Wed, Jan 30, 2019 at 6:37 AM Jeremy Huddleston Sequoia\n> <jeremyhu@apple.com> wrote:\n> > > On Jan 30, 2019, at 03:33, Eric Sunshine <sunshine@sunshineco.com> wrote:\n> > > On Tue, Jan 29, 2019 at 3:11 PM Jeremy Huddleston Sequoia\n> > > <jeremyhu@apple.com> wrote:\n> > >> This was causing problems with ppc/sha1ppc.S\n> > >\n> > > What problems, exactly?\n> >\n> > The file is ignored, but it shouldn't be.\n>\n> But what problem are you experiencing, exactly? .gitignore rules do\n> not impact tracked files such as ppc/sha1ppc.S, even if the name\n> matches an ignore-rule, so it's not clear what problem you're trying\n> to solve.\n\nI'm guessing that this has something to do with HFS+ being\ncase-insensitive yet case-preserving, but an actual explanation of the\nmisbehavior experienced would be helpful.\n"},{"id":"368126","messageId":"nycvar.QRO.7.76.6.1901301340270.41@tvgsbejvaqbjf.bet","threadId":"50352","inReplyTo":"534F20EC-2B29-46C3-BAD9-3CBE7312257F@apple.com","subject":"Re: [PATCH (Apple Git) 01/13] .gitignore: Remove *.s as it matches *.S on case insensitive filesystem","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2019-01-30T12:42:42Z","receivedAt":"2019-01-30T12:43:10Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Jeremy,\n\nOn Wed, 30 Jan 2019, Jeremy Huddleston Sequoia wrote:\n\n> > On Jan 30, 2019, at 03:33, Eric Sunshine <sunshine@sunshineco.com> wrote:\n> > \n> > On Tue, Jan 29, 2019 at 3:11 PM Jeremy Huddleston Sequoia\n> > <jeremyhu@apple.com> wrote:\n> >> This was causing problems with ppc/sha1ppc.S\n> > \n> > What problems, exactly?\n> \n> The file is ignored, but it shouldn't be.\n\nAs somebody who sometimes (pretty rarely, but definitely more than once a\nyear) generates the assembler files to have a deeper look, I really\nunderstand why *.s is ignored, and I think it should stay ignored.\n\nWhat you probably want instead is\n\n\t# Accommodate for case-insensitive filesystems where *.s would catch\n\t!ppc/sha1ppc.S\n\nafter the `*.[aos]` line.\n\nCiao,\nJohannes\n\n> \n> > \n> >> Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>\n> >> ---\n> >> diff --git a/.gitignore b/.gitignore\n> >> @@ -195,7 +195,7 @@\n> >> -*.[aos]\n> >> +*.[ao]\n> \n> \n"},{"id":"368129","messageId":"nycvar.QRO.7.76.6.1901301344430.41@tvgsbejvaqbjf.bet","threadId":"50352","inReplyTo":"09281A61-1EDA-4226-AD59-6A97EDF1B1DB@apple.com","subject":"Re: [PATCH (Apple Git) 02/13] test-lib: Export PERL5LIB for testing git-svn","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2019-01-30T12:51:37Z","receivedAt":"2019-01-30T12:52:11Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Jeremy,\n\nOn Tue, 29 Jan 2019, Jeremy Huddleston Sequoia wrote:\n\n> > On Jan 29, 2019, at 2:47 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> > \n> > Jeremy Huddleston Sequoia <jeremyhu@apple.com> writes:\n> > \n> >> Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>\n> >> ---\n> >> t/test-lib.sh | 3 +++\n> >> 1 file changed, 3 insertions(+)\n> > \n> > This obviously won't be acceptable as-is to my tree.  Shouldn't this\n> > be something to be dealt with in config.mak.uname or something that\n> > is meant to define platform-specific customization?\n> \n> The issue here is that we're not locating relocatable perl modules\n> during testing.  This is a general problem with testing RUNTIME_PREFIX\n> configurations, and a more general solution to this sledgehammer would\n> be appropriate.  I don't think config.mak.uname really makes sense since\n> it's a general RUNTIME_PREFIX issue and not specifically a darwin issue.\n\nFirst of all, as others have pointed out, this code is very, very specific\nto Darwin (not only xcode-select but also Library/Perl/ are very, very\nspecific to that platform, I would even argue it is not even\nDarwin-specific but instead macOS specific because bare-bones Darwin does\nnot have Library/Perl/, does it?).\n\nSo you *definitely* want to put that code into guards testing for that\nplatform (I do not think config.mak.uname is the correct place, though, as\nit should be accessible to test scripts when run directly, i.e. not\nthrough `make`).\n\nBut let's take a huge step back first: why? What is the exact problem this\ncommit tries to solve? The commit message unfortunately does not really\nleave me any wiser.\n\nSo I am left with the unfortunate position of having to guess, which is\nnot really a good use of both of our time. If I allow myself to indulge in\nthe guessing game, I would guess that whatever `perl` executable is used\nin your scenario picks up some unfortunate environment variable that\noverrides its internal defaults where to look for Perl modules.\n\nAnd that simply should not be the case. We are very careful to set\nGITPERLLIB in bin-wrappers/, *not* PERL5LIB.\n\nAnd when we build Git on macOS agents in Travis or Azure Pipelines and\nthen run the test suite, I fail to see any Perl-related error that looks\nlike it could be solved by this here patch.\n\nIn short: this commit is in dear want of a more substantive commit\nmessage, and most likely in search for a different solution.\n\nCiao,\nJohannes\n\n> \n> > \n> >> \n> >> diff --git a/t/test-lib.sh b/t/test-lib.sh\n> >> index 0f1faa24b2..4060a53f56 100644\n> >> --- a/t/test-lib.sh\n> >> +++ b/t/test-lib.sh\n> >> @@ -1017,6 +1017,9 @@ fi\n> >> \n> >> GITPERLLIB=\"$GIT_BUILD_DIR\"/perl/build/lib\n> >> export GITPERLLIB\n> >> +PERL_VERSION=$(grep DEFAULT /usr/local/versioner/perl/versions | sed 's:^.*= *\\([^ ]*\\)$:\\1:')\n> >> +PERL5LIB=\"$GIT_BUILD_DIR\"/perl:\"$(xcode-select -p)\"/Library/Perl/$PERL_VERSION\n> >> +export PERL5LIB\n> >> test -d \"$GIT_BUILD_DIR\"/templates/blt || {\n> >> \terror \"You haven't built things yet, have you?\"\n> >> }\n> \n> \n"},{"id":"368131","messageId":"nycvar.QRO.7.76.6.1901301355140.41@tvgsbejvaqbjf.bet","threadId":"50352","inReplyTo":"20190129193818.8645-4-jeremyhu@apple.com","subject":"Re: [PATCH (Apple Git) 03/13] t0500: New regression test for git add of a path that contains a .git directory","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2019-01-30T13:12:15Z","receivedAt":"2019-01-30T13:12:40Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Jeremy,\n\nOn Tue, 29 Jan 2019, Jeremy Huddleston Sequoia wrote:\n\n> Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>\n\nAs Eric pointed out, commits with such a vanishing commit message are\nvery, very sad commits. And somewhere, a kitten dies every time you submit\nsuch a commit.\n\n> +test_expect_success '<rdar://problem/10238070> -- git add of a path that contains a .git directory' '\n> +\trm -rf .git &&\n> +\tmkdir -p orig/sub/dir/otherdir &&\n> +\tcd orig/sub &&\n> +\techo \"1\" > dir/file &&\n> +\techo \"2\" > dir/otherdir/file &&\n> +\tgit init --quiet &&\n> +\tgit add -A &&\n> +\tgit commit -m \"Initial Commit\" --quiet &&\n> +\tcd - > /dev/null &&\n> +\tgit init --bare --quiet \"${TESTROOT}/git_dir.git\" &&\n> +\tgit --git-dir=\"${TESTROOT}/git_dir.git\" --work-tree=/ add -f -- \"${TESTROOT}/orig/sub/\" &&\n> +\tgit --git-dir=\"${TESTROOT}/git_dir.git\" --work-tree=/ add -f -- \"${TESTROOT}/orig/\" &&\n> +\tgit --git-dir=\"${TESTROOT}/git_dir.git\" --work-tree=/ commit -m \"Commit.\" |\n> +\t\tgrep -q \"2 files changed, 2 insertions\"\n> +'\n\nLet's try to waste some time and reverse engineer what this test is about,\nshall we?\n\nSo first the .git directory is removed. I really have to wonder why\nbecause we seem to do pretty much everything after that outside of that\ndirectory, so I bet that the test would do the exact same thing without\nmucking with that .git directory.\n\nThe some submodule with nested directories is set up (we could do this\nmuch easier by using `mkdir orig && git init orig/sub && test_commit -C\norig/sub 1 && mkdir orig/sub/dir & test_commit -C orig/sub dir/2`, but\nlet's look further before suggesting a better way to implement this).\n\nThen a bare directory is created *somewhere*, and then the submodule as\nwell as its parent directory is added.\n\nFinally, a commit is created with that new index.\n\nSo is the problem that this test tries to catch that a directory\ncontaining a submodule is added together with its .git directory?\n\nI could understand that, I would understand that you would add a\nregression test to catch this, but since it is added with\n`test_expect_success`, I would expect this regression to be fixed for a\nlong time (and probably be committed together with a regression test that\nverifies the very same as your new test).\n\nOkay, so I give up on analyzing this further and simply go back to the\nindicated commit introducing the regression, and applying your patch on\ntop, to see whether it fails. Because there is nothing Apple-specific\nabout it, I'll do this in an Ubuntu VM (because I have no Apple hardware\nhandy, so the only way for me to debug this on macOS would be via Azure\nPipelines, which is tedious and slow).\n\nBut no, this test fails with or without 18e051a3981f (setup: translate\nsymlinks in filename when using absolute paths, 2010-12-27) reverted.\n\nSo the ball is squarely back in your court: care to explain what the\nhaggling heck your patch is trying to achieve?\n\nThanks,\nJohannes\n\n> +\n> +test_done\n> -- \n> 2.20.0 (Apple Git-115)\n> \n> \n"},{"id":"368132","messageId":"nycvar.QRO.7.76.6.1901301419030.41@tvgsbejvaqbjf.bet","threadId":"50352","inReplyTo":"20190129193818.8645-5-jeremyhu@apple.com","subject":"Re: [PATCH (Apple Git) 04/13] t4014: git --version can have SP in it","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2019-01-30T13:30:30Z","receivedAt":"2019-01-30T13:30:55Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Jeremy,\n\nOn Tue, 29 Jan 2019, Jeremy Huddleston Sequoia wrote:\n\n> 480871e09e (\"format-patch: show base info before email signature\",\n> 2016-09-07) added a helper function to recreate the signature at the end\n> of the e-mail, i.e. \"-- \" line followed by the version string of Git,\n> using output from \"git --version\" and stripping everything before the last\n> SP.\n> \n> Because the default Git version string looks like \"git version\n> 2.10.0-1-g480871e09e\", this was mostly OK, but people can change this\n> version string to arbitrary thing while compiling, which can break the\n> assumption if they had SP in it.  Notably, Apple ships modified Git with\n> \" (Apple Git-xx)\" appended to its version number.\n\nHere would be a fine place to add Junio's explanation that `git version`\nalways prefixes \"git version \" to the `git_version_string` and that the\ndefault signature in `builtin/log.c` is defined as said\n`git_version_string`.\n\n> \n> Instead, come up with the version string by stripping the \"git version \"\n> from the beginning.\n> \n> Regressed-in: 480871e09ed2e5275b4ba16b278681e5a8c122ae\n\nThis is really not a good  way to reference a commit, what with our\nintention to switch to SHA-256 at some stage.\n\nBesides, this footer is completely redundant with the information that\nstarts the very first paragraph.\n\nCiao,\nJohannes\n\n> Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>\n> Reviewed-by: Josh Triplett <josh@joshtriplett.org>\n> ---\n>  t/t4014-format-patch.sh | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh\n> index 909c743c13..414c56fcff 100755\n> --- a/t/t4014-format-patch.sh\n> +++ b/t/t4014-format-patch.sh\n> @@ -757,7 +757,7 @@ test_expect_success 'format-patch --ignore-if-in-upstream HEAD' '\n>  \tgit format-patch --ignore-if-in-upstream HEAD\n>  '\n>  \n> -git_version=\"$(git --version | sed \"s/.* //\")\"\n> +git_version=\"$(git --version | sed \"s/git version //\")\"\n\nAs Junio said, this should be anchored. And for extra safety, in case some\neven more unreasonable company decides to change the output of `git\n--version` itself, it should probably use\n\n\tgit_version=\"$(expr \"$(git --version)\" : \"^git version \\(.*\\)\")\"\n\nCiao,\nJohannes\n\n>  \n>  signature() {\n>  \tprintf \"%s\\n%s\\n\\n\" \"-- \" \"${1:-$git_version}\"\n> -- \n> 2.20.0 (Apple Git-115)\n> \n> \n"},{"id":"368133","messageId":"nycvar.QRO.7.76.6.1901301431110.41@tvgsbejvaqbjf.bet","threadId":"50352","inReplyTo":"20190129193818.8645-6-jeremyhu@apple.com","subject":"Re: [PATCH (Apple Git) 05/13] t5701: git --version can have SP in it","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2019-01-30T13:36:43Z","receivedAt":"2019-01-30T13:37:11Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Jeremy,\n\nOn Tue, 29 Jan 2019, Jeremy Huddleston Sequoia wrote:\n\n> Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>\n\n\nThat commit message is again very short. Only because I remember the\nprevious patch's commit message do I have a clue what this is about.\n\nYou definitely need to write something here about customized forks of Git\nadding suffixes including spaces to the Git version.\n\nAnd you will need to state where those spaces are converted to dots in\nGit's capability advertisement. The reason for this requirement: should\nthat logic change at any stage in the future, your patch will fail,\nsomebody will investigate and find this commit and *needs* a helpful\ncommit message.\n\n> ---\n>  t/t5701-git-serve.sh | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/t/t5701-git-serve.sh b/t/t5701-git-serve.sh\n> index ae79c6bbc0..7bc25700fa 100755\n> --- a/t/t5701-git-serve.sh\n> +++ b/t/t5701-git-serve.sh\n> @@ -7,7 +7,7 @@ test_description='test git-serve and server commands'\n>  test_expect_success 'test capability advertisement' '\n>  \tcat >expect <<-EOF &&\n>  \tversion 2\n> -\tagent=git/$(git version | cut -d\" \" -f3)\n> +\tagent=git/$(git --version | sed -e \"s/git version //\" -e \"s/ /\\./g\")\n\nThis `git version` needs to be anchored, and it would be much conciser to\nuse `-e \"y/ /./\"`, which even BSD sed understands according to\nhttps://pubs.opengroup.org/onlinepubs/9699919799/utilities/sed.html\n\nCiao,\nJohannes\n\n>  \tls-refs\n>  \tfetch=shallow\n>  \tserver-option\n> -- \n> 2.20.0 (Apple Git-115)\n> \n> \n"},{"id":"368134","messageId":"nycvar.QRO.7.76.6.1901301439440.41@tvgsbejvaqbjf.bet","threadId":"50352","inReplyTo":"20190129193818.8645-7-jeremyhu@apple.com","subject":"Re: [PATCH (Apple Git) 06/13] Set Apple Git version during build","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2019-01-30T13:43:13Z","receivedAt":"2019-01-30T13:43:41Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Jeremy,\n\nOn Tue, 29 Jan 2019, Jeremy Huddleston Sequoia wrote:\n\n> Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>\n> ---\n>  GIT-VERSION-GEN | 4 ++++\n>  1 file changed, 4 insertions(+)\n> \n> diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN\n> index d1a2814ec7..6fb90854b9 100755\n> --- a/GIT-VERSION-GEN\n> +++ b/GIT-VERSION-GEN\n> @@ -3,6 +3,10 @@\n>  GVF=GIT-VERSION-FILE\n>  DEF_VER=v2.20.1\n>  \n> +if [ -n \"$RC_ProjectSourceVersion\" ] ; then\n> +\tDEF_VER=\"$DEF_VER (Apple Git-$RC_ProjectSourceVersion)\"\n> +fi\n\nThis seems awfully specific to a very specific setup. It won't work when\nbuilding from a Git checkout, either, as `DEF_VER` is not even used then.\n\nAnd the existing facility is the `version` file. Since you want to build\nthis in some sort of automated fashion anyway, you should probably execute\n\n\tsed -n \"s/^DEF_VER=\\\\(.*\\\\)/\\\\1 (Apple Git-$RC_ProjectSourceVersion)/p\" \\\n\t\t<GIT-VERSION-GEN >version\n\nin your automation script. As a bonus, this will work with any unpatched\nGit source code, too!\n\nCiao,\nJohannes\n\n> +\n>  LF='\n>  '\n>  \n> -- \n> 2.20.0 (Apple Git-115)\n> \n> \n"},{"id":"368135","messageId":"nycvar.QRO.7.76.6.1901301444220.41@tvgsbejvaqbjf.bet","threadId":"50352","inReplyTo":"xmqqsgxb5ard.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH (Apple Git) 07/13] HTML documentation is not provided with Apple's git. Make the error message more on point.","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2019-01-30T13:45:12Z","receivedAt":"2019-01-30T13:45:40Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Tue, 29 Jan 2019, Junio C Hamano wrote:\n\n> Jeremy Huddleston Sequoia <jeremyhu@apple.com> writes:\n> \n> > Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>\n> > ---\n> >  builtin/help.c | 2 +-\n> >  1 file changed, 1 insertion(+), 1 deletion(-)\n> >\n> > diff --git a/builtin/help.c b/builtin/help.c\n> > index 7739a5c155..e001b6157c 100644\n> > --- a/builtin/help.c\n> > +++ b/builtin/help.c\n> > @@ -383,7 +383,7 @@ static void get_html_page_path(struct strbuf *page_path, const char *page)\n> >  \tif (!strstr(html_path, \"://\")) {\n> >  \t\tif (stat(mkpath(\"%s/git.html\", html_path), &st)\n> >  \t\t    || !S_ISREG(st.st_mode))\n> > -\t\t\tdie(\"'%s': not a documentation directory.\", html_path);\n> > +\t\t\tdie(\"HTML documentation is not provided by this distribution of git.\");\n> \n> Mentioning HTML in the message may be a good idea, but I feel that\n> \"distribution of git\" is not something we should say in the source\n> for those who are building from the source.  Distributors are free\n> to munge before they generate their binary distribution, of course\n> ;-).\n\nSo maybe something like\n\n#ifdef MISSING_HTML_MESSAGE\n\t\t\tdie(_(MISSING_HTML_MESSAGE));\n#else\n\t\t\tdie(\"'%s': not a documentation directory.\", html_path);\n#endif\n\n?\n\nCiao,\nJohannes\n\n> \n> >  \t}\n> >  \n> >  \tstrbuf_init(page_path, 0);\n> \n"},{"id":"368143","messageId":"xmqqy3723xei.fsf@gitster-ct.c.googlers.com","threadId":"50352","inReplyTo":"20190129193818.8645-2-jeremyhu@apple.com","subject":"Re: [PATCH (Apple Git) 01/13] .gitignore: Remove *.s as it matches *.S on case insensitive filesystem","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-01-30T16:47:33Z","receivedAt":"2019-01-30T16:47:37Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeremy Huddleston Sequoia <jeremyhu@apple.com> writes:\n\n> This was causing problems with ppc/sha1ppc.S\n\n\"causing problems\"?  How?  The source file is already tracked so\n\"git add\" to record updates to it would work just fine, and \"git\nstatus\" would report \"modified\" for it, with or without \"*.S\" in the\n.gitignore file, no?\n\n    To emulate, I just added \".*S\" to .gitignore and modified\n    ppc/sha1ppc.S to double check whta happens.\n\nWe still have the build rule for %.s in our Makefile, so ignoring\n\".s\" is still the right thing to do to make sure \"git add dir/\"\nwon't add \"dir/frotz.s\" by accident.  I sense the downside of doing\nso outweighs whatever benefit it would have on case incapable\nfilesystems (and it is unclear what problem this change is trying to\nwork around).\n\n> Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>\n> ---\n>  .gitignore | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/.gitignore b/.gitignore\n> index 0d77ea5894..a5db584576 100644\n> --- a/.gitignore\n> +++ b/.gitignore\n> @@ -195,7 +195,7 @@\n>  *.deb\n>  /git.spec\n>  *.exe\n> -*.[aos]\n> +*.[ao]\n>  *.py[co]\n>  .depend/\n>  *.gcda\n"},{"id":"368144","messageId":"xmqqtvhq3x9i.fsf@gitster-ct.c.googlers.com","threadId":"50352","inReplyTo":"nycvar.QRO.7.76.6.1901301444220.41@tvgsbejvaqbjf.bet","subject":"Re: [PATCH (Apple Git) 07/13] HTML documentation is not provided with Apple's git. Make the error message more on point.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-01-30T16:50:33Z","receivedAt":"2019-01-30T16:50:39Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> Hi Junio,\n>\n> On Tue, 29 Jan 2019, Junio C Hamano wrote:\n>\n>> Jeremy Huddleston Sequoia <jeremyhu@apple.com> writes:\n>> \n>> > Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>\n>> > ---\n>> >  builtin/help.c | 2 +-\n>> >  1 file changed, 1 insertion(+), 1 deletion(-)\n>> >\n>> > diff --git a/builtin/help.c b/builtin/help.c\n>> > index 7739a5c155..e001b6157c 100644\n>> > --- a/builtin/help.c\n>> > +++ b/builtin/help.c\n>> > @@ -383,7 +383,7 @@ static void get_html_page_path(struct strbuf *page_path, const char *page)\n>> >  \tif (!strstr(html_path, \"://\")) {\n>> >  \t\tif (stat(mkpath(\"%s/git.html\", html_path), &st)\n>> >  \t\t    || !S_ISREG(st.st_mode))\n>> > -\t\t\tdie(\"'%s': not a documentation directory.\", html_path);\n>> > +\t\t\tdie(\"HTML documentation is not provided by this distribution of git.\");\n>> \n>> Mentioning HTML in the message may be a good idea, but I feel that\n>> \"distribution of git\" is not something we should say in the source\n>> for those who are building from the source.  Distributors are free\n>> to munge before they generate their binary distribution, of course\n>> ;-).\n>\n> So maybe something like\n>\n> #ifdef MISSING_HTML_MESSAGE\n> \t\t\tdie(_(MISSING_HTML_MESSAGE));\n> #else\n> \t\t\tdie(\"'%s': not a documentation directory.\", html_path);\n> #endif\n>\n> ?\n\nNo, distributors can fork and build from patched source.  What I\nmeant was along these lines:\n\n    die(_(\"HTML documentation not installed in '%s'.\"), html_path));\n    die(_(\"The installer chose to omit HTML docs from '%s''.\", html_path));\n\n"},{"id":"368149","messageId":"76E751A1-20C9-451B-919E-FF6B3FB5A384@apple.com","threadId":"50352","inReplyTo":"nycvar.QRO.7.76.6.1901301344430.41@tvgsbejvaqbjf.bet","subject":"Re: [PATCH (Apple Git) 02/13] test-lib: Export PERL5LIB for testing git-svn","fromName":"Jeremy Sequoia","fromEmail":"jeremyhu@apple.com","sentAt":"2019-01-30T18:45:36Z","receivedAt":"2019-01-30T18:45:50Z","isPatch":true,"sender":{"key":"jeremyhu@apple.com","avatar":"https://avatars.githubusercontent.com/u/1258676?v=4"},"body":"\n\nSent from my iPhone...\n\n> On Jan 30, 2019, at 04:51, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n> \n> Hi Jeremy,\n> \n> On Tue, 29 Jan 2019, Jeremy Huddleston Sequoia wrote:\n> \n>>> On Jan 29, 2019, at 2:47 PM, Junio C Hamano <gitster@pobox.com> wrote:\n>>> \n>>> Jeremy Huddleston Sequoia <jeremyhu@apple.com> writes:\n>>> \n>>>> Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>\n>>>> ---\n>>>> t/test-lib.sh | 3 +++\n>>>> 1 file changed, 3 insertions(+)\n>>> \n>>> This obviously won't be acceptable as-is to my tree.  Shouldn't this\n>>> be something to be dealt with in config.mak.uname or something that\n>>> is meant to define platform-specific customization?\n>> \n>> The issue here is that we're not locating relocatable perl modules\n>> during testing.  This is a general problem with testing RUNTIME_PREFIX\n>> configurations, and a more general solution to this sledgehammer would\n>> be appropriate.  I don't think config.mak.uname really makes sense since\n>> it's a general RUNTIME_PREFIX issue and not specifically a darwin issue.\n> \n> First of all, as others have pointed out, this code is very, very specific\n> to Darwin (not only xcode-select but also Library/Perl/ are very, very\n> specific to that platform, I would even argue it is not even\n> Darwin-specific but instead macOS specific because bare-bones Darwin does\n> not have Library/Perl/, does it?).\n\nYes.  I first pointed that out in my emails to Peff and in my 00 email ;).  Peff requested that I send  all of our changes (even ones I considered not upstreamable) in order to discuss possible generalized solutions that could apply to others as well.\n\n> So you *definitely* want to put that code into guards testing for that\n> platform (I do not think config.mak.uname is the correct place, though, as\n> it should be accessible to test scripts when run directly, i.e. not\n> through `make`).\n\nIt isn’t applicable to anyone outside of Apple internal build engineers (or maybe folks like OpenDarwin building from our OSS perl and python drops too) as it is specific to Apple’s build systems.\n\nHowever a generalized solution would be useful to others.\n\n> But let's take a huge step back first: why? What is the exact problem this\n> commit tries to solve? The commit message unfortunately does not really\n> leave me any wiser.\n> \n> So I am left with the unfortunate position of having to guess, which is\n> not really a good use of both of our time. If I allow myself to indulge in\n> the guessing game, I would guess that whatever `perl` executable is used\n> in your scenario picks up some unfortunate environment variable that\n> overrides its internal defaults where to look for Perl modules.\n\nThe issue is with RUNTIME_PREFIX.  git’s RUNTINE_PREFIX support assumes that it is the only thing being relocated.  However, with Xcode, svn and its perl modules are relocated as well.  In order to test git-svn, we need to locate those perl modules.  Patch 10 takes care of this when running from the installed location, but we have no svn in the appropriate relative location from the build directory, so we add the explicit path here.\n\n> And that simply should not be the case. We are very careful to set\n> GITPERLLIB in bin-wrappers/, *not* PERL5LIB.\n> \n> And when we build Git on macOS agents in Travis or Azure Pipelines and\n> then run the test suite, I fail to see any Perl-related error that looks\n> like it could be solved by this here patch.\n> \n> In short: this commit is in dear want of a more substantive commit\n> message, and most likely in search for a different solution.\n\nYes, a number of these patches (like this one) were requested to be sent to the list in order to spark a discussion for another generalized solution and not to be merged into mainline.\n\nIs there a notation that would help to call that out on the commit?  I figured it was pretty obvious that this was one of those.\n\n> \n> Ciao,\n> Johannes\n> \n>> \n>>> \n>>>> \n>>>> diff --git a/t/test-lib.sh b/t/test-lib.sh\n>>>> index 0f1faa24b2..4060a53f56 100644\n>>>> --- a/t/test-lib.sh\n>>>> +++ b/t/test-lib.sh\n>>>> @@ -1017,6 +1017,9 @@ fi\n>>>> \n>>>> GITPERLLIB=\"$GIT_BUILD_DIR\"/perl/build/lib\n>>>> export GITPERLLIB\n>>>> +PERL_VERSION=$(grep DEFAULT /usr/local/versioner/perl/versions | sed 's:^.*= *\\([^ ]*\\)$:\\1:')\n>>>> +PERL5LIB=\"$GIT_BUILD_DIR\"/perl:\"$(xcode-select -p)\"/Library/Perl/$PERL_VERSION\n>>>> +export PERL5LIB\n>>>> test -d \"$GIT_BUILD_DIR\"/templates/blt || {\n>>>>    error \"You haven't built things yet, have you?\"\n>>>> }\n>> \n>> \n"},{"id":"368152","messageId":"xmqqmuni3ra8.fsf@gitster-ct.c.googlers.com","threadId":"50352","inReplyTo":"20C7B5F4-58DA-43E4-9332-B206C0D070F0@apple.com","subject":"Re: [PATCH (Apple Git) 02/13] test-lib: Export PERL5LIB for testing git-svn","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-01-30T18:59:43Z","receivedAt":"2019-01-30T18:59:48Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeremy Sequoia <jeremyhu@apple.com> writes:\n\n>> On Jan 29, 2019, at 15:59, SZEDER Gábor <szeder.dev@gmail.com> wrote:\n>> \n>>> On Tue, Jan 29, 2019 at 03:46:07PM -0800, Jeremy Huddleston Sequoia wrote:\n>>> \n>>> \n>>>> On Jan 29, 2019, at 2:47 PM, Junio C Hamano <gitster@pobox.com> wrote:\n>>>> \n>>>> This obviously won't be acceptable as-is to my tree.  Shouldn't this\n>>>> be something to be dealt with in config.mak.uname or something that\n>>>> is meant to define platform-specific customization?\n>>> \n>>> The issue here is that we're not locating relocatable perl modules\n>>> during testing.  This is a general problem with testing\n>>> RUNTIME_PREFIX configurations, and a more general solution to this\n>>> sledgehammer would be appropriate.  I don't think config.mak.uname\n>>> really makes sense since it's a general RUNTIME_PREFIX issue and not\n>>> specifically a darwin issue.\n>> \n>> But this patch is very darwin-specific ...\n>>  ...\n>\n> Yes.  This is one of the patches that I said in the 00 message\n> would certainly not be upstreamable but for which we should find a\n> general solution to the problem if one is available.\n\nYes, I do appreciate seeing these non-upstreamable ones, as they\nserve to illustrate issues that may want to be helped with a bit\nmore customizability in our tree.  I suspect some of them may\nalready have enough solution on our side without any need for\nfurther patching (e.g. the \"version\" one Dscho mentioned for the\n06/13), though.\n\nBTW, I'll be mostly offline today, so I'll return to the discussion\ntomorrow.\n\n"},{"id":"368153","messageId":"EC84411B-52FF-471B-BDDB-D004DFB4CE97@apple.com","threadId":"50352","inReplyTo":"nycvar.QRO.7.76.6.1901301355140.41@tvgsbejvaqbjf.bet","subject":"Re: [PATCH (Apple Git) 03/13] t0500: New regression test for git add of a path that contains a .git directory","fromName":"Jeremy Huddleston Sequoia","fromEmail":"jeremyhu@apple.com","sentAt":"2019-01-30T19:04:58Z","receivedAt":"2019-01-30T19:05:14Z","isPatch":true,"sender":{"key":"jeremyhu@apple.com","avatar":"https://avatars.githubusercontent.com/u/1258676?v=4"},"body":"\n\n> On Jan 30, 2019, at 05:12, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n> \n> Hi Jeremy,\n> \n> On Tue, 29 Jan 2019, Jeremy Huddleston Sequoia wrote:\n> \n>> Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>\n> \n> As Eric pointed out, commits with such a vanishing commit message are\n> very, very sad commits. And somewhere, a kitten dies every time you submit\n> such a commit.\n\nYes.  I removed the commit message once upstream git finally fixed the issue and the commit message no longer applied.  I didn't add a new verbose message because I was under the impression the git community did not want to receive any contribuitions (bug reports, feedback, upstreamed patches) from Apple, and the radar provided all the reference I needed.  If that situation is changing (as it seems to possibly be), I'm happy to update this with details about the issue.  Here's the thread from 2011-2014 about the issue.\n\n\n\nFWIW, it seems that this bug was addressed by ddc2a6281595fd24ea01497c496f88c40a59562f\n\nThanks Martin, now we're no longer carrying around an extra patch for our build of git ;)\n\n--Jeremy\n\n> On Oct 17, 2011, at 14:55, Jeremy Huddleston <jeremyhu@apple.com> wrote:\n> \n> ping.  Did you get my response below with extra details?  I just got a duplicate bug report, so it apparently effects people...\n> \n> Please let me know if I can be of further assistance.\n> \n> On Oct 11, 2011, at 2:17 PM, Jeremy Huddleston wrote:\n> \n>> Thanks for your response Junio.  The text of the original bug report is below.\n>> \n>> I created a git bisect test script which bisected the problem and found out that the difference was that the trailing / was removed by your code change.  git treats paths with a trailing / differently.  I don't know *why* it treats them differently, but it does.\n>> \n>> There's nothing \"special\" about JustDoItGit.tar.bz2 except that it contains a .git dir and has a file layout that works with the bisect script I wrote.  You can test this yourself by:\n>> \n>> mkdir -p ~/tmp/PR-10238070\n>> cd ~/tmp/PR-10238070\n>> tar xjf JustDoItGit.tar.bz2\n>> cd ~/git-checkout\n>> /path/to/test_10238070.sh\n>> \n>> Here's the original report:\n>> \n>> I've tracked the cause of '<rdar://problem/10160992> ##snipped title##' down to a regression in git.\n>> \n>> Unzip the attached JustDoItGit.zip project and replace the path in the following commands to the unzipped location on your system:\n>> \n>> #delete git in /usr/bin/git\n>> sudo rm -r /usr/bin/git\n>> #link it to /usr/local/bin/git since that's where ditto will place the new bits\n>> sudo ln -s /usr/local/bin/git /usr/bin/git\n>> \n>> # first, install git 1.7.3.2 to verify that the bug does not reproduce\n>> sudo ditto ~rc/Software/Slate/Roots/Git/Git-14~19.root/ /\n>> sudo rm -r /Users/<you>/MyGitRepo.gitdir\n>> git --git-dir=/Users/<you>/MyGitRepo.gitdir init --bare --quiet\n>> git --git-dir=/Users/<you>/MyGitRepo.gitdir --work-tree=/ add -- /Users/<you>/Desktop/JustDoItGit/ /Users/<you>/Desktop/JustDoItGit/JustDoItGit/JustDoItGitAppDelegate.h /Users/<you>/Desktop/JustDoItGit/JustDoItGitTests\n>> git --git-dir=/Users/<you>/MyGitRepo.gitdir --work-tree=/ commit -m \"Hello.\"\n>> \n>> The expected result of the commit is something like \"18 files changed, 7364 insertions\". If that's what you get, great, now keep going.\n>> \n>> sudo rm -r /Users/<you>/MyGitRepo.gitdir\n>> # install the slate version of git, 1.7.5.4\n>> sudo ditto ~rc/Software/Slate/Roots/Git/Git-19.root~2/ /\n>> sudo rm -r /Users/<you>/MyGitRepo.gitdir\n>> git --git-dir=/Users/<you>/MyGitRepo.gitdir init --bare --quiet\n>> git --git-dir=/Users/<you>/MyGitRepo.gitdir --work-tree=/ add -- /Users/<you>/Desktop/JustDoItGit/ /Users/<you>/Desktop/JustDoItGit/JustDoItGit/JustDoItGitAppDelegate.h /Users/<you>/Desktop/JustDoItGit/JustDoItGitTests\n>> git --git-dir=/Users/<you>/MyGitRepo.gitdir --work-tree=/ commit -m \"Hello.\"\n>> \n>> The expected result is what's above, something like \"18 files changed, 7364 insertions\". But the actual result is that only the root folder \"/Users/<you>/Desktop/JustDoItGit is added\n>> \n>> This is a problem because it subsequently causes <rdar://problem/10160992> ##snipped title##\n>> \n>> … and therefore breaks Xcode's snapshots feature.\n>> \n>> <JustDoItGit.tar.bz2><test_10238070.sh>\n>> \n>> On Oct 11, 2011, at 10:45, Junio C Hamano wrote:\n>> \n>>> Jeremy Huddleston <jeremyhu@apple.com> writes:\n>>> \n>>>> real_path will strip the trailing / from provided paths.  This fixes\n>>>> a regression introduced in 18e051a3981f38db08521bb61ccf7e4571335353\n>>> \n>>> What is the breakage? The above does not explain why stripping the '/' is\n>>> a wrong thing, and which caller that used to work is broken by that\n>>> behaviour.\n>>> \n>>> A new test block in some of the t/t[0-9]*.sh script to demonstrate the\n>>> breakage and fix to explain and justify your fix better, please?\n>>> \n>>>> \n>>>> Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>\n>>>> ---\n>>>> \n>>>> Here's an updated version that should be a bit more portable and warning-free.\n>>>> \n>>>> setup.c |   10 +++++++++-\n>>>> 1 files changed, 9 insertions(+), 1 deletions(-)\n>>>> \n>>>> diff --git a/setup.c b/setup.c\n>>>> index 61c22e6..e3a8ae3 100644\n>>>> --- a/setup.c\n>>>> +++ b/setup.c\n>>>> @@ -10,8 +10,16 @@ char *prefix_path(const char *prefix, int len, const char *path)\n>>>> \tchar *sanitized;\n>>>> \tif (is_absolute_path(orig)) {\n>>>> \t\tconst char *temp = real_path(path);\n>>>> -\t\tsanitized = xmalloc(len + strlen(temp) + 1);\n>>>> +\t\tsanitized = xmalloc(len + strlen(temp) + 2);\n>>>> \t\tstrcpy(sanitized, temp);\n>>>> +\n>>>> +\t\ttemp = strrchr(path, '\\0');\n>>>> +\t\ttemp--;\n>>>> +\t\tif (*temp == '/') {\n>>>> +\t\t\tchar *s = strrchr(sanitized, '\\0');\n>>>> +\t\t\ts[0] = '/';\n>>>> +\t\t\ts[1] = '\\0';\n>>>> +\t\t}\n>>>> \t} else {\n>>>> \t\tsanitized = xmalloc(len + strlen(path) + 1);\n>>>> \t\tif (len)\n>>> \n>> \n> \n\n\n\n\n\nThe problem was related to real_path not stripping the trailing '/' from paths which confused clients of prefix_path().  This caused the behavior used in the script to fail.  The issue was eventually fixed in ddc2a6281595fd24ea01497c496f88c40a59562f, so all that remains is our test for the original issue.  This test script mimics the behavior of the Xcode snapshotting feature that triggered the problem, which is what uncovered the original issue.\n\n>> +test_expect_success '<rdar://problem/10238070> -- git add of a path that contains a .git directory' '\n>> +\trm -rf .git &&\n>> +\tmkdir -p orig/sub/dir/otherdir &&\n>> +\tcd orig/sub &&\n>> +\techo \"1\" > dir/file &&\n>> +\techo \"2\" > dir/otherdir/file &&\n>> +\tgit init --quiet &&\n>> +\tgit add -A &&\n>> +\tgit commit -m \"Initial Commit\" --quiet &&\n>> +\tcd - > /dev/null &&\n>> +\tgit init --bare --quiet \"${TESTROOT}/git_dir.git\" &&\n>> +\tgit --git-dir=\"${TESTROOT}/git_dir.git\" --work-tree=/ add -f -- \"${TESTROOT}/orig/sub/\" &&\n>> +\tgit --git-dir=\"${TESTROOT}/git_dir.git\" --work-tree=/ add -f -- \"${TESTROOT}/orig/\" &&\n>> +\tgit --git-dir=\"${TESTROOT}/git_dir.git\" --work-tree=/ commit -m \"Commit.\" |\n>> +\t\tgrep -q \"2 files changed, 2 insertions\"\n>> +'\n> \n> Let's try to waste some time and reverse engineer what this test is about,\n> shall we?\n> \n> So first the .git directory is removed. I really have to wonder why\n> because we seem to do pretty much everything after that outside of that\n> directory, so I bet that the test would do the exact same thing without\n> mucking with that .git directory.\n> \n> The some submodule with nested directories is set up (we could do this\n> much easier by using `mkdir orig && git init orig/sub && test_commit -C\n> orig/sub 1 && mkdir orig/sub/dir & test_commit -C orig/sub dir/2`, but\n> let's look further before suggesting a better way to implement this).\n> \n> Then a bare directory is created *somewhere*, and then the submodule as\n> well as its parent directory is added.\n> \n> Finally, a commit is created with that new index.\n> \n> So is the problem that this test tries to catch that a directory\n> containing a submodule is added together with its .git directory?\n> \n> I could understand that, I would understand that you would add a\n> regression test to catch this, but since it is added with\n> `test_expect_success`, I would expect this regression to be fixed for a\n> long time (and probably be committed together with a regression test that\n> verifies the very same as your new test).\n> \n> Okay, so I give up on analyzing this further and simply go back to the\n> indicated commit introducing the regression, and applying your patch on\n> top, to see whether it fails. Because there is nothing Apple-specific\n> about it, I'll do this in an Ubuntu VM (because I have no Apple hardware\n> handy, so the only way for me to debug this on macOS would be via Azure\n> Pipelines, which is tedious and slow).\n> \n> But no, this test fails with or without 18e051a3981f (setup: translate\n> symlinks in filename when using absolute paths, 2010-12-27) reverted.\n> \n> So the ball is squarely back in your court: care to explain what the\n> haggling heck your patch is trying to achieve?\n> \n> Thanks,\n> Johannes\n> \n>> +\n>> +test_done\n>> -- \n>> 2.20.0 (Apple Git-115)\n>> \n>> \n\n"},{"id":"368156","messageId":"nycvar.QRO.7.76.6.1901302005450.41@tvgsbejvaqbjf.bet","threadId":"50352","inReplyTo":"20190129193818.8645-9-jeremyhu@apple.com","subject":"Re: [PATCH (Apple Git) 08/13] git mergetool/difftool doesn't list 'opendiff' as an available tool on 10.8","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2019-01-30T19:07:50Z","receivedAt":"2019-01-30T19:08:18Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Jeremy,\n\nOn Tue, 29 Jan 2019, Jeremy Huddleston Sequoia wrote:\n\n> See <rdar://problem/12652310>\n> \n> Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>\n\nYou know yourself how to improve this commit message rather dramatically.\n\n> ---\n>  git-mergetool--lib.sh | 6 ++++--\n>  1 file changed, 4 insertions(+), 2 deletions(-)\n> \n> diff --git a/git-mergetool--lib.sh b/git-mergetool--lib.sh\n> index 83bf52494c..f85be7406f 100644\n> --- a/git-mergetool--lib.sh\n> +++ b/git-mergetool--lib.sh\n> @@ -273,9 +273,9 @@ list_merge_tool_candidates () {\n>  \tthen\n>  \t\tif test -n \"$GNOME_DESKTOP_SESSION_ID\"\n>  \t\tthen\n> -\t\t\ttools=\"meld opendiff kdiff3 tkdiff xxdiff $tools\"\n> +\t\t\ttools=\"meld kdiff3 tkdiff xxdiff $tools\"\n>  \t\telse\n> -\t\t\ttools=\"opendiff kdiff3 tkdiff xxdiff meld $tools\"\n> +\t\t\ttools=\"kdiff3 tkdiff xxdiff meld $tools\"\n>  \t\tfi\n>  \t\ttools=\"$tools gvimdiff diffuse diffmerge ecmerge\"\n>  \t\ttools=\"$tools p4merge araxis bc codecompare\"\n> @@ -288,6 +288,8 @@ list_merge_tool_candidates () {\n>  \t\ttools=\"$tools emerge vimdiff\"\n>  \t\t;;\n>  \tesac\n> +\n> +\ttools=\"opendiff $tools\"\n\nThat is a hack, not a solution.\n\nA much better idea would be to leave the `DISPLAY` block alone and to add\nan `elif test -x /path/to/known/location` block.\n\nCiao,\nJohannes\n\n>  }\n>  \n>  show_tool_help () {\n> -- \n> 2.20.0 (Apple Git-115)\n> \n> \n"},{"id":"368157","messageId":"8B5241CB-2E1E-4521-8FE1-A84C4896AE82@apple.com","threadId":"50352","inReplyTo":"nycvar.QRO.7.76.6.1901301340270.41@tvgsbejvaqbjf.bet","subject":"Re: [PATCH (Apple Git) 01/13] .gitignore: Remove *.s as it matches *.S on case insensitive filesystem","fromName":"Jeremy Huddleston Sequoia","fromEmail":"jeremyhu@apple.com","sentAt":"2019-01-30T19:13:36Z","receivedAt":"2019-01-30T19:13:45Z","isPatch":true,"sender":{"key":"jeremyhu@apple.com","avatar":"https://avatars.githubusercontent.com/u/1258676?v=4"},"body":"\n\n> On Jan 30, 2019, at 04:42, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n> \n> Hi Jeremy,\n> \n> On Wed, 30 Jan 2019, Jeremy Huddleston Sequoia wrote:\n> \n>>> On Jan 30, 2019, at 03:33, Eric Sunshine <sunshine@sunshineco.com> wrote:\n>>> \n>>> On Tue, Jan 29, 2019 at 3:11 PM Jeremy Huddleston Sequoia\n>>> <jeremyhu@apple.com> wrote:\n>>>> This was causing problems with ppc/sha1ppc.S\n>>> \n>>> What problems, exactly?\n>> \n>> The file is ignored, but it shouldn't be.\n> \n> As somebody who sometimes (pretty rarely, but definitely more than once a\n> year) generates the assembler files to have a deeper look, I really\n> understand why *.s is ignored, and I think it should stay ignored.\n> \n> What you probably want instead is\n> \n> \t# Accommodate for case-insensitive filesystems where *.s would catch\n> \t!ppc/sha1ppc.S\n> \n> after the `*.[aos]` line.\n\nThanks for the suggestion.  I didn't know that was possible with .gitignore.  That's a much better solution.  I was expecting this to just stay in our series as upstreamable, but I'm glad you pointed this out.  I got to learn something new and offload a patch.  Thanks!\n\nI'll now be able include this in my followup series of patches that I think can be upstreamed! =)\n\n> Ciao,\n> Johannes\n> \n>> \n>>> \n>>>> Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>\n>>>> ---\n>>>> diff --git a/.gitignore b/.gitignore\n>>>> @@ -195,7 +195,7 @@\n>>>> -*.[aos]\n>>>> +*.[ao]\n>> \n>> \n\n"},{"id":"368158","messageId":"nycvar.QRO.7.76.6.1901302010210.41@tvgsbejvaqbjf.bet","threadId":"50352","inReplyTo":"230CA858-D709-4142-9563-20A4887F2ED8@apple.com","subject":"Re: [PATCH (Apple Git) 09/13] Use symbolic links rather than hard links for files in libexec","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2019-01-30T19:15:04Z","receivedAt":"2019-01-30T19:15:42Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Jeremy,\n\nOn Wed, 30 Jan 2019, Jeremy Huddleston Sequoia wrote:\n\n> > On Jan 30, 2019, at 01:50, brian m. carlson\n> > <sandals@crustytoothpaste.net> wrote:\n> > \n> > On Tue, Jan 29, 2019 at 11:38:15AM -0800, Jeremy Huddleston Sequoia wrote:\n> >> See <rdar://problem/10573201>\n> > \n> > It's my understanding that Radars aren't public. Could you summarize the\n> > reasons behind this change in the commit message for those of us who\n> > don't have access to view this issue?\n> \n> There was a bug in some tool in our packaging pipeline that resulted in\n> hardlinks not being preserved.  That was fixed, but I decided to leave\n> these as symlinks anyways in case users did a file operation on\n> Xcode.app that didn't preserve hard links.\n> \n> The point here is that it would probably be nice to have hard vs soft be\n> a configuration option.\n\nYour patch does not make it a configuration option. (Or a build option,\nwhich would probably be the more appropriate thing to do here.)\n\nYou need not spend the time on this, though, as Ævar already did, in\nad874608d8c9 (Makefile: optionally symlink libexec/git-core binaries to\nbin/git, 2018-03-13), which made it in v2.18.0 already. All you need to do\nis to define INSTALL_SYMLINKS.\n\nCiao,\nJohannes"},{"id":"368159","messageId":"nycvar.QRO.7.76.6.1901302025490.41@tvgsbejvaqbjf.bet","threadId":"50352","inReplyTo":"20190129193818.8645-11-jeremyhu@apple.com","subject":"Re: [PATCH (Apple Git) 10/13] Support for Xcode.app co-exestince and relocation","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2019-01-30T19:26:39Z","receivedAt":"2019-01-30T19:27:08Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Jeremy,\n\nOn Tue, 29 Jan 2019, Jeremy Huddleston Sequoia wrote:\n\n> This patch has been trimmed down significantly from its original version\n> when rebasing on top of git 2.18 because git 2.18 included support for\n> runtime prefix support for darwin, making this patch mostly duplicative.\n> \n> The remaining changes are needed to ensure that git-perl can find the\n> subversion perl module (which relocates with it) and handle relocation\n> of python scripts.\n> \n> Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>\n\nI am really curious about this kind of problem now. Is it that you want to\nbundle a Perl inside a portable Git, and that Perl is not at all\nrelocatable and so you force Git to pretend that it is?\n\nCiao,\nJohannes\n\n> ---\n>  Makefile                                      |  3 +++\n>  .../runtime_prefix.template.pl                | 25 +++++++++++++++++++\n>  2 files changed, 28 insertions(+)\n> \n> diff --git a/Makefile b/Makefile\n> index 60711d6abe..97f46444f5 100644\n> --- a/Makefile\n> +++ b/Makefile\n> @@ -2171,6 +2171,7 @@ GIT-PERL-HEADER: $(PERL_HEADER_TEMPLATE) GIT-PERL-DEFINES Makefile\n>  \tsed -e 's=@@PATHSEP@@=$(pathsep)=g' \\\n>  \t    -e \"s=@@INSTLIBDIR@@=$$INSTLIBDIR=g\" \\\n>  \t    -e 's=@@PERLLIBDIR_REL@@=$(perllibdir_relative_SQ)=g' \\\n> +\t    -e 's=@@PERLVERSION@@=$(shell grep DEFAULT /usr/local/versioner/perl/versions | sed 's:^.*= *\\([^ ]*\\)$$:\\1:')=g' \\\n>  \t    -e 's=@@GITEXECDIR_REL@@=$(gitexecdir_relative_SQ)=g' \\\n>  \t    -e 's=@@LOCALEDIR_REL@@=$(localedir_relative_SQ)=g' \\\n>  \t    $< >$@+ && \\\n> @@ -2206,6 +2207,8 @@ $(SCRIPT_PYTHON_GEN): GIT-CFLAGS GIT-PREFIX GIT-PYTHON-VARS\n>  $(SCRIPT_PYTHON_GEN): % : %.py\n>  \t$(QUIET_GEN)$(RM) $@ $@+ && \\\n>  \tsed -e '1s|#!.*python|#!$(PYTHON_PATH_SQ)|' \\\n> +\t    -e 's|\\(os\\.getenv(\"GITPYTHONLIB\"\\)[^)]*)|\\1,\"@@INSTLIBDIR@@\")|' \\\n> +\t    -e 's|\"@@INSTLIBDIR@@\"|os.path.realpath(os.path.dirname(sys.argv[0])) + \"/../../share/git-core/python\"|g' \\\n>  \t    $< >$@+ && \\\n>  \tchmod +x $@+ && \\\n>  \tmv $@+ $@\n> diff --git a/perl/header_templates/runtime_prefix.template.pl b/perl/header_templates/runtime_prefix.template.pl\n> index 9d28b3d863..b0b6b0bef1 100644\n> --- a/perl/header_templates/runtime_prefix.template.pl\n> +++ b/perl/header_templates/runtime_prefix.template.pl\n> @@ -1,3 +1,28 @@\n> +# BEGIN XCODE RUNTIME_PREFIX generated code\n> +BEGIN {\n> +    use File::Spec;\n> +    my $PERLVERSION = \"@@PERLVERSION@@\";\n> +    if ($^V =~ m/v([0-9]+).([0-9]+)/) {\n> +        $PERLVERSION = $1.\".\".$2;\n> +    }\n> +    my $__prefix = File::Spec->rel2abs( __FILE__ );\n> +\n> +    if ($__prefix =~ m/\\/libexec\\/git-core\\// ) {\n> +        $__prefix =~ s/\\/libexec\\/git-core\\/.*//;\n> +        unshift @INC, $__prefix . \"/share/git-core/perl\";\n> +        unshift @INC, $__prefix . \"/../Library/Perl/\".$PERLVERSION.\"/darwin-thread-multi-2level\";\n> +    } elsif ($__prefix =~ m/\\/bin\\// ) {\n> +        $__prefix =~ s/\\/bin\\/.*//;\n> +        unshift @INC, $__prefix . \"/share/git-core/perl\";\n> +        unshift @INC, $__prefix . \"/../Library/Perl/\".$PERLVERSION.\"/darwin-thread-multi-2level\";\n> +    } elsif ( $__prefix =~ m/\\/usr\\// ) {\n> +        $__prefix =~ s/\\/usr\\/.*/\\/usr/;\n> +        unshift @INC, $__prefix . \"/share/git-core/perl\";\n> +        unshift @INC, $__prefix . \"/../Library/Perl/\".$PERLVERSION.\"/darwin-thread-multi-2level\";\n> +    }\n> +}\n> +# END XCODE RUNTIME_PREFIX generated code.\n> +\n>  # BEGIN RUNTIME_PREFIX generated code.\n>  #\n>  # This finds our Git::* libraries relative to the script's runtime path.\n> -- \n> 2.20.0 (Apple Git-115)\n> \n> \n"},{"id":"368161","messageId":"nycvar.QRO.7.76.6.1901302030100.41@tvgsbejvaqbjf.bet","threadId":"50352","inReplyTo":"7A37A7C1-6B82-44F8-AECB-189A57B94FBD@apple.com","subject":"Re: [PATCH (Apple Git) 12/13] Enable support for Xcode.app-bundled gitconfig","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2019-01-30T19:32:24Z","receivedAt":"2019-01-30T19:32:52Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Jeremy,\n\nOn Tue, 29 Jan 2019, Jeremy Huddleston Sequoia wrote:\n\n> > On Jan 29, 2019, at 3:10 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> > \n> > Jeremy Huddleston Sequoia <jeremyhu@apple.com> writes:\n> > \n> >> Useful for setting up osxkeychain in Xcode.app's gitconfig\n> >> \n> >> Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>\n> >> ---\n> > \n> > A concern shared with 13/13 is this.\n> > \n> > While it may not hurt too much to look at one extra location even on\n> > non-Apple platform, it probably is a mistake to have this xcode\n> > specific change in generic part of the system like config.c or\n> > attr.c.  For that matter, would it make sense to force Apple uses to\n> > look at one extra location in the first place?  In other words, we\n> > already have \"system wide\" location (i.e. system_path(ETC_GITCONFIG))\n> > defined so system owners can give reasonable default to its users.\n> > The value of not using that facility and instead adding yet another\n> > place is dubious.\n> \n> This allows for per-distribution configuration and could be useful for\n> other applications as well that want customizations specific to their\n> install of git.  For our specific use case, we do not want to munge the\n> system policy when installing Xcode.  Prior to doing things this way, we\n> were just changing the default in our distributed git binary, but this\n> seems a bit more flexible.\n\nI think you misunderstood Junio, thinking that he referred to\n/etc/gitconfig. He did not. system_path(ETC_GITCONFIG) refers to\n<prefix>/etc/gitconfig, where <prefix> is that runtime prefix when\ncompiled with RUNTIME_PREFIX.\n\nSo you can definitely have your own per-distribution configuration: it\nlives in that very <prefix>/etc/gitconfig where the portable Git is\ninstalled.\n\nAnd since we have that nice facility, I agree with Junio that we probably\ndo not even need an extra config, certainly not one just introduced for\nXCode.\n\nCiao,\nJohannes\n\n> \n> > \n> > \n> > \n> > \n> > \n> > \n> > \n> >> config.c | 13 +++++++++++++\n> >> config.h |  2 ++\n> >> 2 files changed, 15 insertions(+)\n> >> \n> >> diff --git a/config.c b/config.c\n> >> index ff521eb27a..656bfef8ab 100644\n> >> --- a/config.c\n> >> +++ b/config.c\n> >> @@ -1631,6 +1631,14 @@ const char *git_etc_gitconfig(void)\n> >> \treturn system_wide;\n> >> }\n> >> \n> >> +const char *git_xcode_gitconfig(void)\n> >> +{\n> >> +\tstatic const char *xcode_config;\n> >> +\tif (!xcode_config)\n> >> +\t\txcode_config = system_path(\"share/git-core/gitconfig\");\n> >> +\treturn xcode_config;\n> >> +}\n> >> +\n> >> /*\n> >>  * Parse environment variable 'k' as a boolean (in various\n> >>  * possible spellings); if missing, use the default value 'def'.\n> >> @@ -1673,6 +1681,11 @@ static int do_git_config_sequence(const struct config_options *opts,\n> >> \telse\n> >> \t\trepo_config = NULL;\n> >> \n> >> +\tcurrent_parsing_scope = CONFIG_SCOPE_XCODE;\n> >> +\tif (git_config_system() && git_xcode_gitconfig() && !access_or_die(git_xcode_gitconfig(), R_OK, 0))\n> >> +\t\tret += git_config_from_file(fn, git_xcode_gitconfig(),\n> >> +\t\t\t\t\t    data);\n> >> +\n> >> \tcurrent_parsing_scope = CONFIG_SCOPE_SYSTEM;\n> >> \tif (git_config_system() && !access_or_die(git_etc_gitconfig(), R_OK, 0))\n> >> \t\tret += git_config_from_file(fn, git_etc_gitconfig(),\n> >> diff --git a/config.h b/config.h\n> >> index ee5d3fa7b4..f848423d28 100644\n> >> --- a/config.h\n> >> +++ b/config.h\n> >> @@ -115,6 +115,7 @@ extern int git_config_rename_section_in_file(const char *, const char *, const c\n> >> extern int git_config_copy_section(const char *, const char *);\n> >> extern int git_config_copy_section_in_file(const char *, const char *, const char *);\n> >> extern const char *git_etc_gitconfig(void);\n> >> +extern const char *git_xcode_gitconfig(void);\n> >> extern int git_env_bool(const char *, int);\n> >> extern unsigned long git_env_ulong(const char *, unsigned long);\n> >> extern int git_config_system(void);\n> >> @@ -131,6 +132,7 @@ enum config_scope {\n> >> \tCONFIG_SCOPE_GLOBAL,\n> >> \tCONFIG_SCOPE_REPO,\n> >> \tCONFIG_SCOPE_CMDLINE,\n> >> +\tCONFIG_SCOPE_XCODE,\n> >> };\n> >> \n> >> extern enum config_scope current_config_scope(void);\n> \n> \n"},{"id":"368162","messageId":"nycvar.QRO.7.76.6.1901302034120.41@tvgsbejvaqbjf.bet","threadId":"50352","inReplyTo":"xmqqtvhq3x9i.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH (Apple Git) 07/13] HTML documentation is not provided with Apple's git. Make the error message more on point.","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2019-01-30T19:34:38Z","receivedAt":"2019-01-30T19:35:07Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Wed, 30 Jan 2019, Junio C Hamano wrote:\n\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> \n> > On Tue, 29 Jan 2019, Junio C Hamano wrote:\n> >\n> >> Jeremy Huddleston Sequoia <jeremyhu@apple.com> writes:\n> >> \n> >> > Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>\n> >> > ---\n> >> >  builtin/help.c | 2 +-\n> >> >  1 file changed, 1 insertion(+), 1 deletion(-)\n> >> >\n> >> > diff --git a/builtin/help.c b/builtin/help.c\n> >> > index 7739a5c155..e001b6157c 100644\n> >> > --- a/builtin/help.c\n> >> > +++ b/builtin/help.c\n> >> > @@ -383,7 +383,7 @@ static void get_html_page_path(struct strbuf *page_path, const char *page)\n> >> >  \tif (!strstr(html_path, \"://\")) {\n> >> >  \t\tif (stat(mkpath(\"%s/git.html\", html_path), &st)\n> >> >  \t\t    || !S_ISREG(st.st_mode))\n> >> > -\t\t\tdie(\"'%s': not a documentation directory.\", html_path);\n> >> > +\t\t\tdie(\"HTML documentation is not provided by this distribution of git.\");\n> >> \n> >> Mentioning HTML in the message may be a good idea, but I feel that\n> >> \"distribution of git\" is not something we should say in the source\n> >> for those who are building from the source.  Distributors are free\n> >> to munge before they generate their binary distribution, of course\n> >> ;-).\n> >\n> > So maybe something like\n> >\n> > #ifdef MISSING_HTML_MESSAGE\n> > \t\t\tdie(_(MISSING_HTML_MESSAGE));\n> > #else\n> > \t\t\tdie(\"'%s': not a documentation directory.\", html_path);\n> > #endif\n> >\n> > ?\n> \n> No, distributors can fork and build from patched source.  What I\n> meant was along these lines:\n> \n>     die(_(\"HTML documentation not installed in '%s'.\"), html_path));\n>     die(_(\"The installer chose to omit HTML docs from '%s''.\", html_path));\n\nThanks for the clarification. I think your rationale makes a total lot of\nsense.\n\nThank you,\nDscho\n"},{"id":"368163","messageId":"9FC095C3-5AC7-4420-887E-24782563A48C@apple.com","threadId":"50352","inReplyTo":"nycvar.QRO.7.76.6.1901301431110.41@tvgsbejvaqbjf.bet","subject":"Re: [PATCH (Apple Git) 05/13] t5701: git --version can have SP in it","fromName":"Jeremy Huddleston Sequoia","fromEmail":"jeremyhu@apple.com","sentAt":"2019-01-30T19:35:05Z","receivedAt":"2019-01-30T19:35:14Z","isPatch":true,"sender":{"key":"jeremyhu@apple.com","avatar":"https://avatars.githubusercontent.com/u/1258676?v=4"},"body":"\n\n> On Jan 30, 2019, at 05:36, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n> \n> Hi Jeremy,\n> \n> On Tue, 29 Jan 2019, Jeremy Huddleston Sequoia wrote:\n> \n>> Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>\n> \n> \n> That commit message is again very short. Only because I remember the\n> previous patch's commit message do I have a clue what this is about.\n\nYeah, I became lax with commit messages when I was under the impression that the git community was not interested engaging with Apple.  I should have taken a pass through these commits before sending, but I half expected these patches to be ignored.  I am delighted to see that I was wrong and will go back and provide more details in the ones that I feel are upstreamable like this one.\n\n> You definitely need to write something here about customized forks of Git\n> adding suffixes including spaces to the Git version.\n> \n> And you will need to state where those spaces are converted to dots in\n> Git's capability advertisement. The reason for this requirement: should\n> that logic change at any stage in the future, your patch will fail,\n> somebody will investigate and find this commit and *needs* a helpful\n> commit message.\n\nThanks, I'll add you to the CC of this patch, so you can critique my wording in the updated message.\n\n> \n>> ---\n>> t/t5701-git-serve.sh | 2 +-\n>> 1 file changed, 1 insertion(+), 1 deletion(-)\n>> \n>> diff --git a/t/t5701-git-serve.sh b/t/t5701-git-serve.sh\n>> index ae79c6bbc0..7bc25700fa 100755\n>> --- a/t/t5701-git-serve.sh\n>> +++ b/t/t5701-git-serve.sh\n>> @@ -7,7 +7,7 @@ test_description='test git-serve and server commands'\n>> test_expect_success 'test capability advertisement' '\n>> \tcat >expect <<-EOF &&\n>> \tversion 2\n>> -\tagent=git/$(git version | cut -d\" \" -f3)\n>> +\tagent=git/$(git --version | sed -e \"s/git version //\" -e \"s/ /\\./g\")\n> \n> This `git version` needs to be anchored,\n\nGood catch, thanks.\n\n> and it would be much conciser to\n> use `-e \"y/ /./\"`, which even BSD sed understands according to\n> https://pubs.opengroup.org/onlinepubs/9699919799/utilities/sed.html\n\nAlso done, thanks.\n\n> \n> Ciao,\n> Johannes\n> \n>> \tls-refs\n>> \tfetch=shallow\n>> \tserver-option\n>> -- \n>> 2.20.0 (Apple Git-115)\n>> \n>> \n\n"},{"id":"368164","messageId":"B19F0115-A78B-4CF4-AE58-7FE5E2FFFB6C@apple.com","threadId":"50352","inReplyTo":"nycvar.QRO.7.76.6.1901301439440.41@tvgsbejvaqbjf.bet","subject":"Re: [PATCH (Apple Git) 06/13] Set Apple Git version during build","fromName":"Jeremy Huddleston Sequoia","fromEmail":"jeremyhu@apple.com","sentAt":"2019-01-30T19:45:27Z","receivedAt":"2019-01-30T19:45:37Z","isPatch":true,"sender":{"key":"jeremyhu@apple.com","avatar":"https://avatars.githubusercontent.com/u/1258676?v=4"},"body":"\n\n> On Jan 30, 2019, at 05:43, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n> \n> Hi Jeremy,\n> \n> On Tue, 29 Jan 2019, Jeremy Huddleston Sequoia wrote:\n> \n>> Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>\n>> ---\n>> GIT-VERSION-GEN | 4 ++++\n>> 1 file changed, 4 insertions(+)\n>> \n>> diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN\n>> index d1a2814ec7..6fb90854b9 100755\n>> --- a/GIT-VERSION-GEN\n>> +++ b/GIT-VERSION-GEN\n>> @@ -3,6 +3,10 @@\n>> GVF=GIT-VERSION-FILE\n>> DEF_VER=v2.20.1\n>> \n>> +if [ -n \"$RC_ProjectSourceVersion\" ] ; then\n>> +\tDEF_VER=\"$DEF_VER (Apple Git-$RC_ProjectSourceVersion)\"\n>> +fi\n> \n> This seems awfully specific to a very specific setup. It won't work when\n> building from a Git checkout, either, as `DEF_VER` is not even used then.\n\nYes.  This one was one of the ones I thought obviously fell into the \"this is certainly not upstreamable, but let's discuss a general solution to this problem\" category.  Sorry if that wasn't clear.\n\n> And the existing facility is the `version` file. Since you want to build\n> this in some sort of automated fashion anyway, you should probably execute\n> \n> \tsed -n \"s/^DEF_VER=\\\\(.*\\\\)/\\\\1 (Apple Git-$RC_ProjectSourceVersion)/p\" \\\n> \t\t<GIT-VERSION-GEN >version\n> \n> in your automation script. As a bonus, this will work with any unpatched\n> Git source code, too!\n\nOh nice!  Thanks for getting rid of one of our patches.\n\n> \n> Ciao,\n> Johannes\n> \n>> +\n>> LF='\n>> '\n>> \n>> -- \n>> 2.20.0 (Apple Git-115)\n>> \n>> \n\n"},{"id":"368180","messageId":"D1597287-4622-4419-ADA4-91B051B25FA6@apple.com","threadId":"50352","inReplyTo":"nycvar.QRO.7.76.6.1901302010210.41@tvgsbejvaqbjf.bet","subject":"Re: [PATCH (Apple Git) 09/13] Use symbolic links rather than hard links for files in libexec","fromName":"Jeremy Huddleston Sequoia","fromEmail":"jeremyhu@apple.com","sentAt":"2019-01-30T20:52:54Z","receivedAt":"2019-01-30T20:53:11Z","isPatch":true,"sender":{"key":"jeremyhu@apple.com","avatar":"https://avatars.githubusercontent.com/u/1258676?v=4"},"body":"\n\n> On Jan 30, 2019, at 11:15, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n> \n> Hi Jeremy,\n> \n> On Wed, 30 Jan 2019, Jeremy Huddleston Sequoia wrote:\n> \n>>> On Jan 30, 2019, at 01:50, brian m. carlson\n>>> <sandals@crustytoothpaste.net> wrote:\n>>> \n>>> On Tue, Jan 29, 2019 at 11:38:15AM -0800, Jeremy Huddleston Sequoia wrote:\n>>>> See <rdar://problem/10573201>\n>>> \n>>> It's my understanding that Radars aren't public. Could you summarize the\n>>> reasons behind this change in the commit message for those of us who\n>>> don't have access to view this issue?\n>> \n>> There was a bug in some tool in our packaging pipeline that resulted in\n>> hardlinks not being preserved.  That was fixed, but I decided to leave\n>> these as symlinks anyways in case users did a file operation on\n>> Xcode.app that didn't preserve hard links.\n>> \n>> The point here is that it would probably be nice to have hard vs soft be\n>> a configuration option.\n> \n> Your patch does not make it a configuration option. (Or a build option,\n> which would probably be the more appropriate thing to do here.)\n> \n> You need not spend the time on this, though, as Ævar already did, in\n> ad874608d8c9 (Makefile: optionally symlink libexec/git-core binaries to\n> bin/git, 2018-03-13), which made it in v2.18.0 already. All you need to do\n> is to define INSTALL_SYMLINKS.\n\nOh great, thanks!  I missed that when doing the last rebase.\n\n\n"},{"id":"368197","messageId":"97CD298A-D301-4D27-9C7A-598C582EB43E@apple.com","threadId":"50352","inReplyTo":"nycvar.QRO.7.76.6.1901302025490.41@tvgsbejvaqbjf.bet","subject":"Re: [PATCH (Apple Git) 10/13] Support for Xcode.app co-exestince and relocation","fromName":"Jeremy Huddleston Sequoia","fromEmail":"jeremyhu@apple.com","sentAt":"2019-01-30T21:07:53Z","receivedAt":"2019-01-30T21:08:08Z","isPatch":true,"sender":{"key":"jeremyhu@apple.com","avatar":"https://avatars.githubusercontent.com/u/1258676?v=4"},"body":"\n\n> On Jan 30, 2019, at 11:26, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n> \n> Hi Jeremy,\n> \n> On Tue, 29 Jan 2019, Jeremy Huddleston Sequoia wrote:\n> \n>> This patch has been trimmed down significantly from its original version\n>> when rebasing on top of git 2.18 because git 2.18 included support for\n>> runtime prefix support for darwin, making this patch mostly duplicative.\n>> \n>> The remaining changes are needed to ensure that git-perl can find the\n>> subversion perl module (which relocates with it) and handle relocation\n>> of python scripts.\n>> \n>> Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>\n> \n> I am really curious about this kind of problem now. Is it that you want to\n> bundle a Perl inside a portable Git, and that Perl is not at all\n> relocatable and so you force Git to pretend that it is?\n\nNot exactly, although that's an interesting problem as well.\n\nIn our specific case, Xcode.app is a relocatable bundle that contains the Xcode application, SDKs, toolchains, useful command line tools including git and svn, and more.  perl is distributed with the system in /usr/bin/perl and not with Xcode.\n\ngit-svn uses requires the perl modules that ship with subversion.  Since subversion ships with Xcode, those perl modules are packaged inside of Xcode, and the system perl has no logic to locate modules in various apps on the system as that would be an abstraction violation, IMO.\n\nThis patch changes the perl template to allow git-svn (or any other perl based tool installed by git) to locate these subversion perl modules within Xcode.app.  It requires the perl script itself to have been executed from within Xcode.app, which is why this complicates testing out of the build directory as discussed in patch 2 in the series.\n\nThe /usr/local/versioner/perl/versions logic there is specific to our build infrastructure, but if you're interested in taking something like this, I could come up with a better way to generalize it.\n\nThe issues for python are similar to for perl, but I forget the specifics around what exactly was failing in the python case.\n\n> Ciao,\n> Johannes\n> \n>> ---\n>> Makefile                                      |  3 +++\n>> .../runtime_prefix.template.pl                | 25 +++++++++++++++++++\n>> 2 files changed, 28 insertions(+)\n>> \n>> diff --git a/Makefile b/Makefile\n>> index 60711d6abe..97f46444f5 100644\n>> --- a/Makefile\n>> +++ b/Makefile\n>> @@ -2171,6 +2171,7 @@ GIT-PERL-HEADER: $(PERL_HEADER_TEMPLATE) GIT-PERL-DEFINES Makefile\n>> \tsed -e 's=@@PATHSEP@@=$(pathsep)=g' \\\n>> \t    -e \"s=@@INSTLIBDIR@@=$$INSTLIBDIR=g\" \\\n>> \t    -e 's=@@PERLLIBDIR_REL@@=$(perllibdir_relative_SQ)=g' \\\n>> +\t    -e 's=@@PERLVERSION@@=$(shell grep DEFAULT /usr/local/versioner/perl/versions | sed 's:^.*= *\\([^ ]*\\)$$:\\1:')=g' \\\n>> \t    -e 's=@@GITEXECDIR_REL@@=$(gitexecdir_relative_SQ)=g' \\\n>> \t    -e 's=@@LOCALEDIR_REL@@=$(localedir_relative_SQ)=g' \\\n>> \t    $< >$@+ && \\\n>> @@ -2206,6 +2207,8 @@ $(SCRIPT_PYTHON_GEN): GIT-CFLAGS GIT-PREFIX GIT-PYTHON-VARS\n>> $(SCRIPT_PYTHON_GEN): % : %.py\n>> \t$(QUIET_GEN)$(RM) $@ $@+ && \\\n>> \tsed -e '1s|#!.*python|#!$(PYTHON_PATH_SQ)|' \\\n>> +\t    -e 's|\\(os\\.getenv(\"GITPYTHONLIB\"\\)[^)]*)|\\1,\"@@INSTLIBDIR@@\")|' \\\n>> +\t    -e 's|\"@@INSTLIBDIR@@\"|os.path.realpath(os.path.dirname(sys.argv[0])) + \"/../../share/git-core/python\"|g' \\\n>> \t    $< >$@+ && \\\n>> \tchmod +x $@+ && \\\n>> \tmv $@+ $@\n>> diff --git a/perl/header_templates/runtime_prefix.template.pl b/perl/header_templates/runtime_prefix.template.pl\n>> index 9d28b3d863..b0b6b0bef1 100644\n>> --- a/perl/header_templates/runtime_prefix.template.pl\n>> +++ b/perl/header_templates/runtime_prefix.template.pl\n>> @@ -1,3 +1,28 @@\n>> +# BEGIN XCODE RUNTIME_PREFIX generated code\n>> +BEGIN {\n>> +    use File::Spec;\n>> +    my $PERLVERSION = \"@@PERLVERSION@@\";\n>> +    if ($^V =~ m/v([0-9]+).([0-9]+)/) {\n>> +        $PERLVERSION = $1.\".\".$2;\n>> +    }\n>> +    my $__prefix = File::Spec->rel2abs( __FILE__ );\n>> +\n>> +    if ($__prefix =~ m/\\/libexec\\/git-core\\// ) {\n>> +        $__prefix =~ s/\\/libexec\\/git-core\\/.*//;\n>> +        unshift @INC, $__prefix . \"/share/git-core/perl\";\n>> +        unshift @INC, $__prefix . \"/../Library/Perl/\".$PERLVERSION.\"/darwin-thread-multi-2level\";\n>> +    } elsif ($__prefix =~ m/\\/bin\\// ) {\n>> +        $__prefix =~ s/\\/bin\\/.*//;\n>> +        unshift @INC, $__prefix . \"/share/git-core/perl\";\n>> +        unshift @INC, $__prefix . \"/../Library/Perl/\".$PERLVERSION.\"/darwin-thread-multi-2level\";\n>> +    } elsif ( $__prefix =~ m/\\/usr\\// ) {\n>> +        $__prefix =~ s/\\/usr\\/.*/\\/usr/;\n>> +        unshift @INC, $__prefix . \"/share/git-core/perl\";\n>> +        unshift @INC, $__prefix . \"/../Library/Perl/\".$PERLVERSION.\"/darwin-thread-multi-2level\";\n>> +    }\n>> +}\n>> +# END XCODE RUNTIME_PREFIX generated code.\n>> +\n>> # BEGIN RUNTIME_PREFIX generated code.\n>> #\n>> # This finds our Git::* libraries relative to the script's runtime path.\n>> -- \n>> 2.20.0 (Apple Git-115)\n>> \n>> \n\n"},{"id":"368198","messageId":"EE1DF652-C42D-4106-8A81-55262EC578D0@apple.com","threadId":"50352","inReplyTo":"nycvar.QRO.7.76.6.1901302030100.41@tvgsbejvaqbjf.bet","subject":"Re: [PATCH (Apple Git) 12/13] Enable support for Xcode.app-bundled gitconfig","fromName":"Jeremy Huddleston Sequoia","fromEmail":"jeremyhu@apple.com","sentAt":"2019-01-30T21:09:32Z","receivedAt":"2019-01-30T21:09:43Z","isPatch":true,"sender":{"key":"jeremyhu@apple.com","avatar":"https://avatars.githubusercontent.com/u/1258676?v=4"},"body":"\n\n> On Jan 30, 2019, at 11:32, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n> \n> Hi Jeremy,\n> \n> On Tue, 29 Jan 2019, Jeremy Huddleston Sequoia wrote:\n> \n>>> On Jan 29, 2019, at 3:10 PM, Junio C Hamano <gitster@pobox.com> wrote:\n>>> \n>>> Jeremy Huddleston Sequoia <jeremyhu@apple.com> writes:\n>>> \n>>>> Useful for setting up osxkeychain in Xcode.app's gitconfig\n>>>> \n>>>> Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>\n>>>> ---\n>>> \n>>> A concern shared with 13/13 is this.\n>>> \n>>> While it may not hurt too much to look at one extra location even on\n>>> non-Apple platform, it probably is a mistake to have this xcode\n>>> specific change in generic part of the system like config.c or\n>>> attr.c.  For that matter, would it make sense to force Apple uses to\n>>> look at one extra location in the first place?  In other words, we\n>>> already have \"system wide\" location (i.e. system_path(ETC_GITCONFIG))\n>>> defined so system owners can give reasonable default to its users.\n>>> The value of not using that facility and instead adding yet another\n>>> place is dubious.\n>> \n>> This allows for per-distribution configuration and could be useful for\n>> other applications as well that want customizations specific to their\n>> install of git.  For our specific use case, we do not want to munge the\n>> system policy when installing Xcode.  Prior to doing things this way, we\n>> were just changing the default in our distributed git binary, but this\n>> seems a bit more flexible.\n> \n> I think you misunderstood Junio, thinking that he referred to\n> /etc/gitconfig. He did not. system_path(ETC_GITCONFIG) refers to\n> <prefix>/etc/gitconfig, where <prefix> is that runtime prefix when\n> compiled with RUNTIME_PREFIX.\n\nOh!  Awesome.  I didn't even notice this was a thing.  That would exactly solve our use case.  I'll give that a whirl.  That likely allows us to eliminate these two patches completely!\n\n> So you can definitely have your own per-distribution configuration: it\n> lives in that very <prefix>/etc/gitconfig where the portable Git is\n> installed.\n> \n> And since we have that nice facility, I agree with Junio that we probably\n> do not even need an extra config, certainly not one just introduced for\n> XCode.\n> \n> Ciao,\n> Johannes\n> \n>> \n>>> \n>>> \n>>> \n>>> \n>>> \n>>> \n>>> \n>>>> config.c | 13 +++++++++++++\n>>>> config.h |  2 ++\n>>>> 2 files changed, 15 insertions(+)\n>>>> \n>>>> diff --git a/config.c b/config.c\n>>>> index ff521eb27a..656bfef8ab 100644\n>>>> --- a/config.c\n>>>> +++ b/config.c\n>>>> @@ -1631,6 +1631,14 @@ const char *git_etc_gitconfig(void)\n>>>> \treturn system_wide;\n>>>> }\n>>>> \n>>>> +const char *git_xcode_gitconfig(void)\n>>>> +{\n>>>> +\tstatic const char *xcode_config;\n>>>> +\tif (!xcode_config)\n>>>> +\t\txcode_config = system_path(\"share/git-core/gitconfig\");\n>>>> +\treturn xcode_config;\n>>>> +}\n>>>> +\n>>>> /*\n>>>> * Parse environment variable 'k' as a boolean (in various\n>>>> * possible spellings); if missing, use the default value 'def'.\n>>>> @@ -1673,6 +1681,11 @@ static int do_git_config_sequence(const struct config_options *opts,\n>>>> \telse\n>>>> \t\trepo_config = NULL;\n>>>> \n>>>> +\tcurrent_parsing_scope = CONFIG_SCOPE_XCODE;\n>>>> +\tif (git_config_system() && git_xcode_gitconfig() && !access_or_die(git_xcode_gitconfig(), R_OK, 0))\n>>>> +\t\tret += git_config_from_file(fn, git_xcode_gitconfig(),\n>>>> +\t\t\t\t\t    data);\n>>>> +\n>>>> \tcurrent_parsing_scope = CONFIG_SCOPE_SYSTEM;\n>>>> \tif (git_config_system() && !access_or_die(git_etc_gitconfig(), R_OK, 0))\n>>>> \t\tret += git_config_from_file(fn, git_etc_gitconfig(),\n>>>> diff --git a/config.h b/config.h\n>>>> index ee5d3fa7b4..f848423d28 100644\n>>>> --- a/config.h\n>>>> +++ b/config.h\n>>>> @@ -115,6 +115,7 @@ extern int git_config_rename_section_in_file(const char *, const char *, const c\n>>>> extern int git_config_copy_section(const char *, const char *);\n>>>> extern int git_config_copy_section_in_file(const char *, const char *, const char *);\n>>>> extern const char *git_etc_gitconfig(void);\n>>>> +extern const char *git_xcode_gitconfig(void);\n>>>> extern int git_env_bool(const char *, int);\n>>>> extern unsigned long git_env_ulong(const char *, unsigned long);\n>>>> extern int git_config_system(void);\n>>>> @@ -131,6 +132,7 @@ enum config_scope {\n>>>> \tCONFIG_SCOPE_GLOBAL,\n>>>> \tCONFIG_SCOPE_REPO,\n>>>> \tCONFIG_SCOPE_CMDLINE,\n>>>> +\tCONFIG_SCOPE_XCODE,\n>>>> };\n>>>> \n>>>> extern enum config_scope current_config_scope(void);\n>> \n>> \n\n"},{"id":"368206","messageId":"8507DB9E-A76E-4038-BDB6-110066865C1E@apple.com","threadId":"50352","inReplyTo":"EE1DF652-C42D-4106-8A81-55262EC578D0@apple.com","subject":"Re: [PATCH (Apple Git) 12/13] Enable support for Xcode.app-bundled gitconfig","fromName":"Jeremy Huddleston Sequoia","fromEmail":"jeremyhu@apple.com","sentAt":"2019-01-30T22:01:05Z","receivedAt":"2019-01-30T23:16:16Z","isPatch":true,"sender":{"key":"jeremyhu@apple.com","avatar":"https://avatars.githubusercontent.com/u/1258676?v=4"},"body":"\n\n> On Jan 30, 2019, at 13:09, Jeremy Huddleston Sequoia <jeremyhu@apple.com> wrote:\n> \n> \n> \n>> On Jan 30, 2019, at 11:32, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n>> \n>> Hi Jeremy,\n>> \n>> On Tue, 29 Jan 2019, Jeremy Huddleston Sequoia wrote:\n>> \n>>>> On Jan 29, 2019, at 3:10 PM, Junio C Hamano <gitster@pobox.com> wrote:\n>>>> \n>>>> Jeremy Huddleston Sequoia <jeremyhu@apple.com> writes:\n>>>> \n>>>>> Useful for setting up osxkeychain in Xcode.app's gitconfig\n>>>>> \n>>>>> Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>\n>>>>> ---\n>>>> \n>>>> A concern shared with 13/13 is this.\n>>>> \n>>>> While it may not hurt too much to look at one extra location even on\n>>>> non-Apple platform, it probably is a mistake to have this xcode\n>>>> specific change in generic part of the system like config.c or\n>>>> attr.c.  For that matter, would it make sense to force Apple uses to\n>>>> look at one extra location in the first place?  In other words, we\n>>>> already have \"system wide\" location (i.e. system_path(ETC_GITCONFIG))\n>>>> defined so system owners can give reasonable default to its users.\n>>>> The value of not using that facility and instead adding yet another\n>>>> place is dubious.\n>>> \n>>> This allows for per-distribution configuration and could be useful for\n>>> other applications as well that want customizations specific to their\n>>> install of git.  For our specific use case, we do not want to munge the\n>>> system policy when installing Xcode.  Prior to doing things this way, we\n>>> were just changing the default in our distributed git binary, but this\n>>> seems a bit more flexible.\n>> \n>> I think you misunderstood Junio, thinking that he referred to\n>> /etc/gitconfig. He did not. system_path(ETC_GITCONFIG) refers to\n>> <prefix>/etc/gitconfig, where <prefix> is that runtime prefix when\n>> compiled with RUNTIME_PREFIX.\n> \n> Oh!  Awesome.  I didn't even notice this was a thing.  That would exactly solve our use case.  I'll give that a whirl.  That likely allows us to eliminate these two patches completely!\n\nUnfortunately, I was quick to celebrate.  This picks up the bundled file instead of a system-wide file.  I'd love it if we could still honor system-wide config/attributes in addition to RUNTIME_PREFIX-relative ones (eg: user overrides system which overrides distribution).  I worry that as is, we'd stop referencing the system-wide configs which might confuse users.\n\nIs that something you'd be interested in, or should we just continue to maintain our separate patches?\n\n> \n>> So you can definitely have your own per-distribution configuration: it\n>> lives in that very <prefix>/etc/gitconfig where the portable Git is\n>> installed.\n>> \n>> And since we have that nice facility, I agree with Junio that we probably\n>> do not even need an extra config, certainly not one just introduced for\n>> XCode.\n>> \n>> Ciao,\n>> Johannes\n>> \n>>> \n>>>> \n>>>> \n>>>> \n>>>> \n>>>> \n>>>> \n>>>> \n>>>>> config.c | 13 +++++++++++++\n>>>>> config.h |  2 ++\n>>>>> 2 files changed, 15 insertions(+)\n>>>>> \n>>>>> diff --git a/config.c b/config.c\n>>>>> index ff521eb27a..656bfef8ab 100644\n>>>>> --- a/config.c\n>>>>> +++ b/config.c\n>>>>> @@ -1631,6 +1631,14 @@ const char *git_etc_gitconfig(void)\n>>>>> \treturn system_wide;\n>>>>> }\n>>>>> \n>>>>> +const char *git_xcode_gitconfig(void)\n>>>>> +{\n>>>>> +\tstatic const char *xcode_config;\n>>>>> +\tif (!xcode_config)\n>>>>> +\t\txcode_config = system_path(\"share/git-core/gitconfig\");\n>>>>> +\treturn xcode_config;\n>>>>> +}\n>>>>> +\n>>>>> /*\n>>>>> * Parse environment variable 'k' as a boolean (in various\n>>>>> * possible spellings); if missing, use the default value 'def'.\n>>>>> @@ -1673,6 +1681,11 @@ static int do_git_config_sequence(const struct config_options *opts,\n>>>>> \telse\n>>>>> \t\trepo_config = NULL;\n>>>>> \n>>>>> +\tcurrent_parsing_scope = CONFIG_SCOPE_XCODE;\n>>>>> +\tif (git_config_system() && git_xcode_gitconfig() && !access_or_die(git_xcode_gitconfig(), R_OK, 0))\n>>>>> +\t\tret += git_config_from_file(fn, git_xcode_gitconfig(),\n>>>>> +\t\t\t\t\t    data);\n>>>>> +\n>>>>> \tcurrent_parsing_scope = CONFIG_SCOPE_SYSTEM;\n>>>>> \tif (git_config_system() && !access_or_die(git_etc_gitconfig(), R_OK, 0))\n>>>>> \t\tret += git_config_from_file(fn, git_etc_gitconfig(),\n>>>>> diff --git a/config.h b/config.h\n>>>>> index ee5d3fa7b4..f848423d28 100644\n>>>>> --- a/config.h\n>>>>> +++ b/config.h\n>>>>> @@ -115,6 +115,7 @@ extern int git_config_rename_section_in_file(const char *, const char *, const c\n>>>>> extern int git_config_copy_section(const char *, const char *);\n>>>>> extern int git_config_copy_section_in_file(const char *, const char *, const char *);\n>>>>> extern const char *git_etc_gitconfig(void);\n>>>>> +extern const char *git_xcode_gitconfig(void);\n>>>>> extern int git_env_bool(const char *, int);\n>>>>> extern unsigned long git_env_ulong(const char *, unsigned long);\n>>>>> extern int git_config_system(void);\n>>>>> @@ -131,6 +132,7 @@ enum config_scope {\n>>>>> \tCONFIG_SCOPE_GLOBAL,\n>>>>> \tCONFIG_SCOPE_REPO,\n>>>>> \tCONFIG_SCOPE_CMDLINE,\n>>>>> +\tCONFIG_SCOPE_XCODE,\n>>>>> };\n>>>>> \n>>>>> extern enum config_scope current_config_scope(void);\n>>> \n>>> \n> \n\n"},{"id":"368209","messageId":"20190131000137.GB23492@gmail.com","threadId":"50352","inReplyTo":"8507DB9E-A76E-4038-BDB6-110066865C1E@apple.com","subject":"Re: [PATCH (Apple Git) 12/13] Enable support for Xcode.app-bundled gitconfig","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2019-01-31T00:01:37Z","receivedAt":"2019-01-31T00:01:41Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Hi,\n\nJeremy Huddleston Sequoia wrote:\n\n> Unfortunately, I was quick to celebrate.  This picks up the bundled\n> file instead of a system-wide file.  I'd love it if we could still\n> honor system-wide config/attributes in addition to\n> RUNTIME_PREFIX-relative ones (eg: user overrides system which\n> overrides distribution).  I worry that as is, we'd stop referencing\n> the system-wide configs which might confuse users.\n> \n> Is that something you'd be interested in, or should we just continue\n> to maintain our separate patches?\n\nFor the internal deployment at Google, what we've done is to put an\n[include] path directive in the global gitconfig:\n\n\t[include]\n\t\tpath = /usr/share/git-core/config\n\nUsers can edit the global git config in etc, but the distributed\nconfig at /usr/share/git-core/config is read-only as part of the\ndistributed package.\n\nWe considered making an upstream change to bake in the distributed\nconfig in the git binary but decided that this way is a little\nnicer since it lets people comment out the include.path setting if\nthey want to e.g. for experimentation.  It's also more explicit\n(hence easier to understand).\n\nWould a similar approach work for your setup?  Can you say a little\nmore about how you'd like things to work from an end-user pov?\n\nThanks,\nJonathan\n"},{"id":"368227","messageId":"63687F17-1BC5-40B4-9708-EACFFEEFCB57@apple.com","threadId":"50352","inReplyTo":"20190131000137.GB23492@gmail.com","subject":"Re: [PATCH (Apple Git) 12/13] Enable support for Xcode.app-bundled gitconfig","fromName":"Jeremy Huddleston Sequoia","fromEmail":"jeremyhu@apple.com","sentAt":"2019-01-31T08:29:14Z","receivedAt":"2019-01-31T08:29:27Z","isPatch":true,"sender":{"key":"jeremyhu@apple.com","avatar":"https://avatars.githubusercontent.com/u/1258676?v=4"},"body":"\n\n> On Jan 30, 2019, at 16:01, Jonathan Nieder <jrnieder@gmail.com> wrote:\n> \n> Hi,\n> \n> Jeremy Huddleston Sequoia wrote:\n> \n>> Unfortunately, I was quick to celebrate.  This picks up the bundled\n>> file instead of a system-wide file.  I'd love it if we could still\n>> honor system-wide config/attributes in addition to\n>> RUNTIME_PREFIX-relative ones (eg: user overrides system which\n>> overrides distribution).  I worry that as is, we'd stop referencing\n>> the system-wide configs which might confuse users.\n>> \n>> Is that something you'd be interested in, or should we just continue\n>> to maintain our separate patches?\n> \n> For the internal deployment at Google, what we've done is to put an\n> [include] path directive in the global gitconfig:\n> \n> \t[include]\n> \t\tpath = /usr/share/git-core/config\n> \n> Users can edit the global git config in etc, but the distributed\n> config at /usr/share/git-core/config is read-only as part of the\n> distributed package.\n> \n> We considered making an upstream change to bake in the distributed\n> config in the git binary but decided that this way is a little\n> nicer since it lets people comment out the include.path setting if\n> they want to e.g. for experimentation.  It's also more explicit\n> (hence easier to understand).\n> \n> Would a similar approach work for your setup?  Can you say a little\n> more about how you'd like things to work from an end-user pov?\n\nThat might work.  I could put this in the Xcode.app gitconfig:\n\n\t[include]\n\t\tpath = /private/etc/gitconfig\n\nWould that result in /private/etc/gitconfig's taking precedence or Xcode.app's?\nIs there anything analogous I could do for gitattributes?\n\n"},{"id":"368248","messageId":"xmqq4l9o4sm7.fsf@gitster-ct.c.googlers.com","threadId":"50352","inReplyTo":"8B5241CB-2E1E-4521-8FE1-A84C4896AE82@apple.com","subject":"Re: [PATCH (Apple Git) 01/13] .gitignore: Remove *.s as it matches *.S on case insensitive filesystem","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-01-31T17:57:52Z","receivedAt":"2019-01-31T17:57:58Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeremy Huddleston Sequoia <jeremyhu@apple.com> writes:\n\n>> What you probably want instead is\n>> \n>> \t# Accommodate for case-insensitive filesystems where *.s would catch\n>> \t!ppc/sha1ppc.S\n>> \n>> after the `*.[aos]` line.\n>\n> Thanks for the suggestion.  I didn't know that was possible with\n> .gitignore.  That's a much better solution.\n\nI still do not see what problem you need a \"solution\" for in the\nfirst place---I saw a few comments asking it in the thread, but saw\nno answer.  ppc/sha1ppc.S is already tracked, so any modification\nyou make in the working tree can be added to the index with \"git\nadd\" and \"git status\" would report when you have modification to\nthat file in the working tree, without any such extra entry in\n.gitignore, no?\n"},{"id":"368250","messageId":"xmqqzhrg3dnv.fsf@gitster-ct.c.googlers.com","threadId":"50352","inReplyTo":"EE1DF652-C42D-4106-8A81-55262EC578D0@apple.com","subject":"Re: [PATCH (Apple Git) 12/13] Enable support for Xcode.app-bundled gitconfig","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-01-31T18:06:12Z","receivedAt":"2019-01-31T18:06:18Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeremy Huddleston Sequoia <jeremyhu@apple.com> writes:\n\n>>>> A concern shared with 13/13 is this.\n>>>> \n>>>> While it may not hurt too much to look at one extra location even on\n>>>> non-Apple platform, it probably is a mistake to have this xcode\n>>>> specific change in generic part of the system like config.c or\n>>>> attr.c.  For that matter, would it make sense to force Apple uses to\n>>>> look at one extra location in the first place?  In other words, we\n>>>> already have \"system wide\" location (i.e. system_path(ETC_GITCONFIG))\n>>>> defined so system owners can give reasonable default to its users.\n>>>> The value of not using that facility and instead adding yet another\n>>>> place is dubious.\n>>> \n>>> This allows for per-distribution configuration and could be useful for\n>>> other applications as well that want customizations specific to their\n>>> install of git.  For our specific use case, we do not want to munge the\n>>> system policy when installing Xcode.  Prior to doing things this way, we\n>>> were just changing the default in our distributed git binary, but this\n>>> seems a bit more flexible.\n>> \n>> I think you misunderstood Junio, thinking that he referred to\n>> /etc/gitconfig. He did not. system_path(ETC_GITCONFIG) refers to\n>> <prefix>/etc/gitconfig, where <prefix> is that runtime prefix when\n>> compiled with RUNTIME_PREFIX.\n>\n> Oh!  Awesome.\n\nI do not think you misunderstood.  system_path(ETC_GITCONFIG) may be\nin <prefix>/etc/gitconfig when building with RUNTIME_PREFIX, but\nthen I do not think /etc/gitconfig (without <prefix>) comes into the\npicture.  So as long as you want to add \"a forced by distribution,\nnot editable by end user to set a global policy for the entire box\"\nconfiguration, that goes against the design of the configuration\nsystem, which wants to have three levels (i.e. per repository, per\nuser and per box).\n\nI think the arrangement jrnieder illustrates in a message in this\nthread to use the inclusion of distro-provided file from\n/etc/gitconfig, which documents what is happening clearly and still\nallows the user to disable the distro-provided one if needed, is\nprobably the best solution under the current design.\n\n"},{"id":"368253","messageId":"F67B3B30-64D8-4B0D-A4FD-7263415B0064@apple.com","threadId":"50352","inReplyTo":"xmqq4l9o4sm7.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH (Apple Git) 01/13] .gitignore: Remove *.s as it matches *.S on case insensitive filesystem","fromName":"Jeremy Sequoia","fromEmail":"jeremyhu@apple.com","sentAt":"2019-01-31T18:17:13Z","receivedAt":"2019-01-31T18:17:25Z","isPatch":true,"sender":{"key":"jeremyhu@apple.com","avatar":"https://avatars.githubusercontent.com/u/1258676?v=4"},"body":"\n\nSent from my iPhone...\n\n> On Jan 31, 2019, at 09:57, Junio C Hamano <gitster@pobox.com> wrote:\n> \n> Jeremy Huddleston Sequoia <jeremyhu@apple.com> writes:\n> \n>>> What you probably want instead is\n>>> \n>>>    # Accommodate for case-insensitive filesystems where *.s would catch\n>>>    !ppc/sha1ppc.S\n>>> \n>>> after the `*.[aos]` line.\n>> \n>> Thanks for the suggestion.  I didn't know that was possible with\n>> .gitignore.  That's a much better solution.\n> \n> I still do not see what problem you need a \"solution\" for in the\n> first place---I saw a few comments asking it in the thread, but saw\n> no answer.  ppc/sha1ppc.S is already tracked, so any modification\n> you make in the working tree can be added to the index with \"git\n> add\" and \"git status\" would report when you have modification to\n> that file in the working tree, without any such extra entry in\n> .gitignore, no?\n\nI originally saw this because the .gitignore was present in the tarball, and we would only update to new versions by pulling in the newer tarball.  This resulted in *.S not being included in our repo.\n\nWhen I switched to having upstream be a subtree instead of an extracted tarball, I noticed this difference when comparing the source code difference between the tarball based approach and the git subtree approach.\n\nThis would have implications for anyone doing something similar or to anyone intending to add new assembly files to the tree (since they wouldn’t show up in status or get added with add -A),"},{"id":"368262","messageId":"CAPig+cST93AUt+7LHsigeA2=AHvNwveCPEszP6-kvjpkRTNmQQ@mail.gmail.com","threadId":"50352","inReplyTo":"F67B3B30-64D8-4B0D-A4FD-7263415B0064@apple.com","subject":"Re: [PATCH (Apple Git) 01/13] .gitignore: Remove *.s as it matches *.S on case insensitive filesystem","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2019-01-31T19:48:08Z","receivedAt":"2019-01-31T19:48:22Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Thu, Jan 31, 2019 at 1:17 PM Jeremy Sequoia <jeremyhu@apple.com> wrote:\n> > On Jan 31, 2019, at 09:57, Junio C Hamano <gitster@pobox.com> wrote:\n> > I still do not see what problem you need a \"solution\" for in the\n> > first place---I saw a few comments asking it in the thread, but saw\n> > no answer.  ppc/sha1ppc.S is already tracked, so any modification\n> > you make in the working tree can be added to the index with \"git\n> > add\" and \"git status\" would report when you have modification to\n> > that file in the working tree, without any such extra entry in\n> > .gitignore, no?\n>\n> This would have implications for anyone doing something similar or\n> to anyone intending to add new assembly files to the tree (since\n> they wouldn’t show up in status or get added with add -A),\n\nThis nugget finally gives readers an idea of the sort of issue this\npatch wants to \"fix\", which happens to be related to HFS+ being\ncase-insensitive. As noted upstream, though, files which are already\ntracked, such as ppc/sha1ppc.S, are not subject to .gitignore, so\nDscho's proposed modification to .gitignore:\n\n    ...\n    *.[aos]\n    !ppc/sha1ppc.S\n    ...\n\ndoesn't actually help. Moreover, this .gitignore change doesn't at all\nhelp the case you describe about new assembly files not being noticed\nby \"git status\" or \"git add -A\" since any new files won't be named\n\"ppc/sha1ppc.S\".\n\nAs Junio said upstream, .gitignore ignoring \"*.s\" files is the right\nthing to do for this project and, as adding new .S files is so rare,\nit seems unlikely that a patch changing .gitignore to accommodate the\nabove use-case for case-insensitive filesystems would make sense to\nthe project as a whole.\n"}]}