From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>,
git@vger.kernel.org
Subject: Re: [PATCH 23/24] t5505,t5516: create .git/branches/ when needed
Date: Fri, 19 Jul 2019 16:52:00 +0200 (CEST) [thread overview]
Message-ID: <nycvar.QRO.7.76.6.1907191555180.47@tvgsbejvaqbjf.bet> (raw)
In-Reply-To: <xmqqftn3xet7.fsf@gitster-ct.c.googlers.com>
Hi Junio,
On Thu, 18 Jul 2019, Junio C Hamano wrote:
> "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
> writes:
>
> > From: Johannes Schindelin <johannes.schindelin@gmx.de>
> >
> > It is a real old anachronism from the Cogito days to have a
> > .git/branches/ directory. And to have tests that ensure that Cogito
> > users can migrate away from using that directory.
> >
> > But so be it, let's continue testing it.
> >
> > Let's make sure, however, that git init does not need to create that
> > directory.
> >
> > This bug was noticed when testing with templates that had been
> > pre-committed, skipping the empty branches/ directory of course because
> > Git does not track empty directories.
>
> Many tests assume that the .git/info/ directory exists, and the only
> reason why they can is because we have templates/info--exclude; the
> situation around .git/branches/ is exactly the same.
No, the situation with `info/` is that it includes a file called
`exclude`, which means that the `templates/` directory can be "tracked".
This is important because we want to commit all those generated files
that cannot be generated inside Visual Studio without Git for Windows'
SDK (which weighs in with several hundred megabytes to download, a
gigabyte on disk).
The `branches/` subdirectory, in contrast, is totally useless for at
least 99.999% of the users, and hence it is understandable that it does
not even contain a single file. Which means that it is *not* "tracked".
So when checking out, e.g. the `vs/master` branch at
https://github.com/git-for-windows/git, which is auto-generated using
this here patch series from Git for Windows' `master`, to allow building
in Visual Studio without having to download the full Git for Windows
SDK, there will be the `info/` directory (by virtue of containing a
trackable file) exists, and the `branches/` subdirectory won't exist.
As a consequence, the test scripts indicated in the commit message,
which _can_ be run in a regular Git for Windows (no Git for Windows SDK
required), will fail without this patch.
> Deprecating .git/branches/ directory and dropping the parts of tests
> that wants to make sure the support still works (t5516 is not about
> migration but about working with .git/branches configuration) would
> be a different matter.
Indeed.
You probably forgot that I already proposed that, long time ago:
https://public-inbox.org/git/cover.1494509599.git.johannes.schindelin@gmx.de/
I haven't forgotten, because you shot it down unceremoniously:
The last time I thought about trying this several years ago, I found
that people who need to grab things from many places still do use
.git/branches/ and their use case is hard to migrate to .git/config,
primarily because the former is "one per file" and it is easy to
add/remove/tweak without affecting others. Ask akpm@ if he still
prefers to use .git/branches/ for example.
Of course, with such a kind of argument, there is no way how I could
possibly prove that it is no longer advisable to have `.git/branches/`.
"Someone, somewhere _probably_ finds this still useful, so we won't
remove it."
> Until that happens, let's not do this patch;
Well, that's another of these type of arguments.
Without this patch, and without removing support for `.git/branches/`,
you force the Visual Studio build to _not_ pass the test suite. It's as
simple as that.
So basically, by this statement you decided that there will not be a
fully-functional way to build Git in Visual Studio and to pass the test
suite with that.
Which is a shame.
> otherwise it would force us to sprinkle "mkdir -p .git/info/" all
> over the place for the same rationale.
You may have assumed that I did not carefully verify that the test suite
passes with these patches. But I did. And I would not have submitted
this patch series if such a patch was necessary, at least not without
said patch.
> A directory in .git/ created by hardcoded mkdir in "git init" (like
> .git/refs/) and created by copying templates by "git init" (like
> .git/info/ and .git/branches) are both "created by 'git init'".
> Special casing the latter is just silly.
The thing that _really_ is silly is that we have that directory in
Git's templates, still.
Git itself does not populate it. Git does not need it, ever. Git works
Just Fine without it, and it is really by design that it does not
require the presence of that subdirectory.
Only those two test cases insist, for some reason that escapes me, on
the presence of those subdirectories.
As I said, Git does not populate that subdirectory. It even lacks all
facilities to populate it. You have to write the files inside it
yourself, you have to figure out the syntax of the files in that
directory, and the only place where we document this is buried deeply in
`Documentation/gitrepository-layout.txt`.
It is a bit silly, too, that we say there, in that very documentation
for that very feature, that this feature is "slightly deprecated".
Either it is deprecated, or it isn't.
Further, it is a bit silly that this "slight deprecation" has been there
since a1d4aa74241 (Add repository-layout document., 2005-09-01).
In other words, that feature was "slightly deprecated" already a mere
five months after Git was made public. Yet we still shlep it around,
fourteen (!) years later.
In yet other words, the support for `.git/branches` has been "slightly
deprecated" more than 33x longer than it hasn't been.
I just wish that my patches to remove the support for `.git/branches`
would have gone somewhere useful instead of into this ugly impasse.
Ciao,
Dscho
next prev parent reply other threads:[~2019-07-19 14:52 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-18 13:19 [PATCH 00/24] Reinstate support for Visual Studio Johannes Schindelin via GitGitGadget
2019-07-18 13:19 ` [PATCH 01/24] Vcproj.pm: auto-generate GUIDs Johannes Schindelin via GitGitGadget
2019-07-18 13:19 ` [PATCH 03/24] Vcproj.pm: do not configure VCWebServiceProxyGeneratorTool Johannes Schindelin via GitGitGadget
2019-07-18 13:19 ` [PATCH 02/24] Vcproj.pm: list git.exe first to be startup project Philip Oakley via GitGitGadget
2019-07-18 13:19 ` [PATCH 04/24] Vcproj.pm: urlencode '<' and '>' when generating VC projects Johannes Schindelin via GitGitGadget
2019-07-18 13:19 ` [PATCH 05/24] contrib/buildsystems: ignore invalidcontinue.obj Philip Oakley via GitGitGadget
2019-07-18 13:19 ` [PATCH 06/24] contrib/buildsystems: ignore irrelevant files in Generators/ Johannes Schindelin via GitGitGadget
2019-07-18 13:19 ` [PATCH 07/24] contrib/buildsystems: fix misleading error message Philip Oakley via GitGitGadget
2019-07-18 13:19 ` [PATCH 08/24] contrib/buildsystems: handle quoted spaces in filenames Philip Oakley via GitGitGadget
2019-07-18 13:19 ` [PATCH 09/24] contrib/buildsystems: ignore gettext stuff Philip Oakley via GitGitGadget
2019-07-18 13:19 ` [PATCH 10/24] contrib/buildsystems: redirect errors of the dry run into a log file Philip Oakley via GitGitGadget
2019-07-18 13:19 ` [PATCH 12/24] contrib/buildsystems: error out on unknown option Johannes Schindelin via GitGitGadget
2019-07-18 13:19 ` [PATCH 11/24] contrib/buildsystems: optionally capture the dry-run in a file Philip Oakley via GitGitGadget
2019-07-18 13:19 ` [PATCH 13/24] contrib/buildsystems: handle the curl library option Philip Oakley via GitGitGadget
2019-07-18 13:19 ` [PATCH 15/24] contrib/buildsystems: also handle -lexpat Johannes Schindelin via GitGitGadget
2019-07-18 13:19 ` [PATCH 14/24] contrib/buildsystems: handle libiconv, too Johannes Schindelin via GitGitGadget
2019-07-18 13:19 ` [PATCH 16/24] contrib/buildsystems: handle options starting with a slash Johannes Schindelin via GitGitGadget
2019-07-18 13:19 ` [PATCH 17/24] contrib/buildsystems: add a backend for modern Visual Studio versions Johannes Schindelin via GitGitGadget
2019-07-18 13:19 ` [PATCH 18/24] msvc: add a Makefile target to pre-generate the Visual Studio solution Johannes Schindelin via GitGitGadget
2019-07-18 13:19 ` [PATCH 19/24] vcxproj: also link-or-copy builtins Johannes Schindelin via GitGitGadget
2019-07-18 13:19 ` [PATCH 21/24] .gitignore: ignore Visual Studio's temporary/generated files Johannes Schindelin via GitGitGadget
2019-07-18 13:19 ` [PATCH 20/24] .gitignore: touch up the entries regarding Visual Studio Philip Oakley via GitGitGadget
2019-07-18 13:19 ` [PATCH 22/24] bin-wrappers: append `.exe` to target paths if necessary Johannes Schindelin via GitGitGadget
2019-07-18 13:19 ` [PATCH 24/24] git: avoid calling aliased builtins via their dashed form Johannes Schindelin via GitGitGadget
2019-07-18 13:19 ` [PATCH 23/24] t5505,t5516: create .git/branches/ when needed Johannes Schindelin via GitGitGadget
2019-07-18 20:34 ` Junio C Hamano
2019-07-19 14:52 ` Johannes Schindelin [this message]
2019-07-19 15:07 ` Junio C Hamano
2019-07-19 15:36 ` Junio C Hamano
2019-07-19 16:30 ` Junio C Hamano
2019-07-29 20:08 ` [PATCH v2 00/23] Reinstate support for Visual Studio Johannes Schindelin via GitGitGadget
2019-07-29 20:08 ` [PATCH v2 02/23] Vcproj.pm: list git.exe first to be startup project Philip Oakley via GitGitGadget
2019-07-29 20:08 ` [PATCH v2 01/23] Vcproj.pm: auto-generate GUIDs Johannes Schindelin via GitGitGadget
2019-07-29 20:08 ` [PATCH v2 03/23] Vcproj.pm: do not configure VCWebServiceProxyGeneratorTool Johannes Schindelin via GitGitGadget
2019-07-29 20:08 ` [PATCH v2 04/23] Vcproj.pm: urlencode '<' and '>' when generating VC projects Johannes Schindelin via GitGitGadget
2019-07-29 20:08 ` [PATCH v2 05/23] contrib/buildsystems: ignore invalidcontinue.obj Philip Oakley via GitGitGadget
2019-07-29 20:08 ` [PATCH v2 06/23] contrib/buildsystems: ignore irrelevant files in Generators/ Johannes Schindelin via GitGitGadget
2019-07-29 20:08 ` [PATCH v2 08/23] contrib/buildsystems: handle quoted spaces in filenames Philip Oakley via GitGitGadget
2019-07-29 20:08 ` [PATCH v2 07/23] contrib/buildsystems: fix misleading error message Philip Oakley via GitGitGadget
2019-07-29 20:08 ` [PATCH v2 09/23] contrib/buildsystems: ignore gettext stuff Philip Oakley via GitGitGadget
2019-07-29 20:08 ` [PATCH v2 10/23] contrib/buildsystems: redirect errors of the dry run into a log file Philip Oakley via GitGitGadget
2019-07-29 20:08 ` [PATCH v2 11/23] contrib/buildsystems: optionally capture the dry-run in a file Philip Oakley via GitGitGadget
2019-07-29 20:08 ` [PATCH v2 12/23] contrib/buildsystems: error out on unknown option Johannes Schindelin via GitGitGadget
2019-07-29 20:08 ` [PATCH v2 13/23] contrib/buildsystems: handle the curl library option Philip Oakley via GitGitGadget
2019-07-29 20:08 ` [PATCH v2 15/23] contrib/buildsystems: also handle -lexpat Johannes Schindelin via GitGitGadget
2019-07-29 20:08 ` [PATCH v2 14/23] contrib/buildsystems: handle libiconv, too Johannes Schindelin via GitGitGadget
2019-07-29 20:08 ` [PATCH v2 16/23] contrib/buildsystems: handle options starting with a slash Johannes Schindelin via GitGitGadget
2019-07-29 20:08 ` [PATCH v2 17/23] contrib/buildsystems: add a backend for modern Visual Studio versions Johannes Schindelin via GitGitGadget
2019-07-29 20:08 ` [PATCH v2 18/23] msvc: add a Makefile target to pre-generate the Visual Studio solution Johannes Schindelin via GitGitGadget
2019-07-29 20:08 ` [PATCH v2 19/23] vcxproj: also link-or-copy builtins Johannes Schindelin via GitGitGadget
2019-07-29 20:08 ` [PATCH v2 20/23] .gitignore: touch up the entries regarding Visual Studio Philip Oakley via GitGitGadget
2019-08-25 12:07 ` SZEDER Gábor
2019-08-25 13:20 ` Philip Oakley
2019-08-25 19:09 ` SZEDER Gábor
2019-08-25 22:21 ` Philip Oakley
2019-08-26 9:10 ` SZEDER Gábor
2019-08-28 11:34 ` Johannes Schindelin
2019-08-26 14:57 ` Johannes Schindelin
2019-08-26 15:49 ` Junio C Hamano
2019-07-29 20:08 ` [PATCH v2 21/23] .gitignore: ignore Visual Studio's temporary/generated files Johannes Schindelin via GitGitGadget
2019-07-29 20:08 ` [PATCH v2 23/23] git: avoid calling aliased builtins via their dashed form Johannes Schindelin via GitGitGadget
2019-07-29 20:08 ` [PATCH v2 22/23] bin-wrappers: append `.exe` to target paths if necessary Johannes Schindelin via GitGitGadget
2019-07-29 21:56 ` [PATCH v2 00/23] Reinstate support for Visual Studio Junio C Hamano
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.1907191555180.47@tvgsbejvaqbjf.bet \
--to=johannes.schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=gitster@pobox.com \
/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).