From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Jeff King <peff@peff.net>
Cc: Junio C Hamano <gitster@pobox.com>,
Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>,
git@vger.kernel.org
Subject: Re: [PATCH 2/5] tests: respect GIT_TEST_INSTALLED when initializing repositories
Date: Thu, 15 Nov 2018 13:29:58 +0100 (STD) [thread overview]
Message-ID: <nycvar.QRO.7.76.6.1811151329150.41@tvgsbejvaqbjf.bet> (raw)
In-Reply-To: <20181114213851.GA2960@sigill.intra.peff.net>
Hi Junio,
On Wed, 14 Nov 2018, Jeff King wrote:
> On Wed, Nov 14, 2018 at 02:16:37PM +0100, Johannes Schindelin wrote:
>
> > > Makes perfect sense. Shouldn't we be asking where the template
> > > directory of the installed version is and using it instead of the
> > > freshly built one, no?
> >
> > It would make sense, but we don't know how to get that information, do we?
> >
> > $ git grep DEFAULT_GIT_TEMPLATE_DIR
> > Makefile: -DDEFAULT_GIT_TEMPLATE_DIR='"$(template_dir_SQ)"'
> > builtin/init-db.c:#ifndef DEFAULT_GIT_TEMPLATE_DIR
> > builtin/init-db.c:#define DEFAULT_GIT_TEMPLATE_DIR "/usr/share/git-core/templates"
> > builtin/init-db.c: template_dir = to_free = system_path(DEFAULT_GIT_TEMPLATE_DIR);
> > contrib/vscode/init.sh: '-DDEFAULT_GIT_TEMPLATE_DIR="$(template_dir_SQ)"' \
> >
> > In other words, the Makefile defines the DEFAULT_GIT_TEMPLATE_DIR, and the
> > only user in the code is init-db.c which uses it in copy_templates().
> >
> > And changing the code *now* to let us query Git where it thinks its
> > templates should be won't work, as this patch is about using the installed
> > Git (at whatever pre-compiled version that might be).
>
> Do we actually care where the templates are? I thought the point was to
> override for the built Git to use the built templates instead of the
> installed one. For an installed Git, shouldn't we not be overriding the
> templates at all? I.e.:
>
> if test -n "$GIT_TEST_INSTALLED"
> then
> "$GIT_TEST_INSTALLED/git" init
> else
> "$GIT_ExEC_PATH/git" init --template="$GIT_BUILD_DIR/templates/blt"
> fi >&3 2>&4
>
> (That's all leaving aside the question of whether we ought to be using a
> clean template dir instead of this).
I fear that that might buy us a ton of trouble. Just like we override the
system config, we should override the templates.
Ciao,
Dscho
next prev parent reply other threads:[~2018-11-15 12:30 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-12 13:48 [PATCH 0/5] tests: various improvements to the GIT_TEST_INSTALLED feature Johannes Schindelin via GitGitGadget
2018-11-12 13:48 ` [PATCH 1/5] tests: fix GIT_TEST_INSTALLED's PATH to include t/helper/ Johannes Schindelin via GitGitGadget
2018-11-14 4:53 ` Junio C Hamano
2018-11-12 13:48 ` [PATCH 2/5] tests: respect GIT_TEST_INSTALLED when initializing repositories Johannes Schindelin via GitGitGadget
2018-11-14 4:55 ` Junio C Hamano
2018-11-14 13:16 ` Johannes Schindelin
2018-11-14 14:59 ` Junio C Hamano
2018-11-14 21:38 ` Jeff King
2018-11-15 12:29 ` Johannes Schindelin [this message]
2018-11-15 12:41 ` Jeff King
2018-11-12 13:48 ` [PATCH 3/5] t/lib-gettext: test installed git-sh-i18n if GIT_TEST_INSTALLED is set Johannes Schindelin via GitGitGadget
2018-11-14 4:56 ` Junio C Hamano
2018-11-12 13:48 ` [PATCH 4/5] tests: do not require Git to be built when testing an installed Git Johannes Schindelin via GitGitGadget
2018-11-14 5:01 ` Junio C Hamano
2018-11-14 13:20 ` Johannes Schindelin
2018-11-14 12:52 ` Jeff King
2018-11-14 13:41 ` Johannes Schindelin
2018-11-12 13:48 ` [PATCH 5/5] tests: explicitly use `git.exe` on Windows Johannes Schindelin via GitGitGadget
2018-11-14 5:14 ` Junio C Hamano
2018-11-14 13:24 ` Johannes Schindelin
2018-11-14 14:47 ` Junio C Hamano
2018-11-14 16:32 ` [PATCH v2 0/5] tests: various improvements to the GIT_TEST_INSTALLED feature Johannes Schindelin via GitGitGadget
2018-11-14 16:32 ` [PATCH v2 1/5] tests: fix GIT_TEST_INSTALLED's PATH to include t/helper/ Johannes Schindelin via GitGitGadget
2018-11-14 16:32 ` [PATCH v2 2/5] tests: respect GIT_TEST_INSTALLED when initializing repositories Johannes Schindelin via GitGitGadget
2018-11-14 16:32 ` [PATCH v2 3/5] t/lib-gettext: test installed git-sh-i18n if GIT_TEST_INSTALLED is set Johannes Schindelin via GitGitGadget
2018-11-14 16:32 ` [PATCH v2 4/5] tests: do not require Git to be built when testing an installed Git Johannes Schindelin via GitGitGadget
2018-11-14 16:32 ` [PATCH v2 5/5] tests: explicitly use `git.exe` on Windows Johannes Schindelin via GitGitGadget
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=nycvar.QRO.7.76.6.1811151329150.41@tvgsbejvaqbjf.bet \
--to=johannes.schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).