{"thread":{"id":"48585","subject":"does a new repo actually *need* default template content?","startedAt":"2018-05-28T13:02:02Z","lastAt":"2018-06-01T14:36:20Z","messageCount":4,"participants":["Robert P. J. Day","Ævar Arnfjörð Bjarmason","Jeff King","Santiago Torres"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"348665","messageId":"alpine.LFD.2.21.1805280836140.10191@localhost.localdomain","threadId":"48585","inReplyTo":null,"subject":"does a new repo actually *need* default template content?","fromName":"Robert P. J. Day","fromEmail":"rpjday@crashcourse.ca","sentAt":"2018-05-28T13:00:00Z","receivedAt":"2018-05-28T13:02:02Z","isPatch":false,"sender":{"key":"rpjday@crashcourse.ca","avatar":"https://avatars.githubusercontent.com/u/226084077?v=4"},"body":"\n  (apologies for more pedantic nitpickery, just little things i'm\nrunning across in my travels. aside: i actually teach git courses, so\nit's a bit embarrassing that i don't know some of this stuff. *sigh*.)\n\n  running on fully-updated fedora 28 system:\n\n  $ git --version\n  git version 2.17.0\n  $\n\n  is there anything in /usr/share/git-core/templates/ that is actually\n*essential* when initializing a new repo? this is what's in my\ndirectory by that name:\n\n  ├── branches\n  ├── description\n  ├── hooks\n  │   ├── applypatch-msg.sample\n  │   ├── commit-msg.sample\n  │   ├── fsmonitor-watchman.sample\n  │   ├── post-update.sample\n  │   ├── pre-applypatch.sample\n  │   ├── pre-commit.sample\n  │   ├── prepare-commit-msg.sample\n  │   ├── pre-push.sample\n  │   ├── pre-rebase.sample\n  │   ├── pre-receive.sample\n  │   └── update.sample\n  └── info\n      └── exclude\n\nbut none of that above looks critically important.\n\n  \"man gitrepository-layout\" describes the \"branches\" directory as\n\"slightly deprecated\", the default description file has a generic\n\"Unnamed repository\" message but, hey, so does the git source code\nrepo itself, the hooks are all \"commented out\", and the info/exclude\nfile effectively has no content, so i'm guessing that nothing there\nactually needs to be used to populate a new repo via \"git init\",\ncorrect?\n\n  under the circumstances, then, should it be a viable option to\ninitialize a new repo while specifying you want *no* initial template\ncontent? it appears you can do that just by specifying a bogus\ntemplate directory (or even /dev/null) with \"--template=\", but that\ngenerates a \"warning\" -- does a selection like that even merit a\n\"warning\" if it's clear that's what i'm trying to do?\n\nrday\n\n-- \n\n========================================================================\nRobert P. J. Day                                 Ottawa, Ontario, CANADA\n                  http://crashcourse.ca/dokuwiki\n\nTwitter:                                       http://twitter.com/rpjday\nLinkedIn:                               http://ca.linkedin.com/in/rpjday\n========================================================================"},{"id":"348678","messageId":"87h8mr7jgj.fsf@evledraar.gmail.com","threadId":"48585","inReplyTo":"alpine.LFD.2.21.1805280836140.10191@localhost.localdomain","subject":"Re: does a new repo actually *need* default template content?","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2018-05-28T17:56:12Z","receivedAt":"2018-05-28T17:56:18Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Mon, May 28 2018, Robert P. J. Day wrote:\n\n>   (apologies for more pedantic nitpickery, just little things i'm\n> running across in my travels. aside: i actually teach git courses, so\n> it's a bit embarrassing that i don't know some of this stuff. *sigh*.)\n\nAside from maybe the empty branches/ directory (see c8a58ac5a5 (\"Revert\n\"Don't create the $GIT_DIR/branches directory on init\"\", 2009-10-31)),\nnone of this is needed.\n\nI wish we didn't create any of this stuff, but have never been inclined\nto make that my hill to die on.\n\nI think we're much better off just shipping e.g. a single README file in\nhooks/, or just nothing at all.\n\nWe should at least do something different on \"git init --bare than\" a\nplain \"git clone\". By a quick check I have 20MB worth of 4 thousand\ncopies of 36 unique variations .git/hooks versions in my local area\nwhere I clone random stuff to, none of which uses any hooks.\n\nI think we shouldn't do anything on --bare either, except maybe a small\nREADME_GIT_REPOSITORY_FORMAT which would refer to\ngitrepository-layout(5) and a system-wide template directory.\n\nThis might have been more useful back in the early days at a time where\nit was common for git users to host their own repositories, but almost\nnobody does that anymore, and if they do they're expert level users who\ncan just get these hooks with a \"cp -R\".\n\n\n\n>   running on fully-updated fedora 28 system:\n>\n>   $ git --version\n>   git version 2.17.0\n>   $\n>\n>   is there anything in /usr/share/git-core/templates/ that is actually\n> *essential* when initializing a new repo? this is what's in my\n> directory by that name:\n>\n>   ├── branches\n>   ├── description\n>   ├── hooks\n>   │ ├── applypatch-msg.sample\n>   │ ├── commit-msg.sample\n>   │ ├── fsmonitor-watchman.sample\n>   │ ├── post-update.sample\n>   │ ├── pre-applypatch.sample\n>   │ ├── pre-commit.sample\n>   │ ├── prepare-commit-msg.sample\n>   │ ├── pre-push.sample\n>   │ ├── pre-rebase.sample\n>   │ ├── pre-receive.sample\n>   │ └── update.sample\n>   └── info\n>       └── exclude\n>\n> but none of that above looks critically important.\n>\n>   \"man gitrepository-layout\" describes the \"branches\" directory as\n> \"slightly deprecated\", the default description file has a generic\n> \"Unnamed repository\" message but, hey, so does the git source code\n> repo itself, the hooks are all \"commented out\", and the info/exclude\n> file effectively has no content, so i'm guessing that nothing there\n> actually needs to be used to populate a new repo via \"git init\",\n> correct?\n>\n>   under the circumstances, then, should it be a viable option to\n> initialize a new repo while specifying you want *no* initial template\n> content? it appears you can do that just by specifying a bogus\n> template directory (or even /dev/null) with \"--template=\", but that\n> generates a \"warning\" -- does a selection like that even merit a\n> \"warning\" if it's clear that's what i'm trying to do?\n>\n> rday\n"},{"id":"348980","messageId":"20180601070609.GC15578@sigill.intra.peff.net","threadId":"48585","inReplyTo":"87h8mr7jgj.fsf@evledraar.gmail.com","subject":"Re: does a new repo actually *need* default template content?","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2018-06-01T07:06:10Z","receivedAt":"2018-06-01T07:06:14Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, May 28, 2018 at 07:56:12PM +0200, Ævar Arnfjörð Bjarmason wrote:\n\n> \n> On Mon, May 28 2018, Robert P. J. Day wrote:\n> \n> >   (apologies for more pedantic nitpickery, just little things i'm\n> > running across in my travels. aside: i actually teach git courses, so\n> > it's a bit embarrassing that i don't know some of this stuff. *sigh*.)\n> \n> Aside from maybe the empty branches/ directory (see c8a58ac5a5 (\"Revert\n> \"Don't create the $GIT_DIR/branches directory on init\"\", 2009-10-31)),\n> none of this is needed.\n> \n> I wish we didn't create any of this stuff, but have never been inclined\n> to make that my hill to die on.\n> \n> I think we're much better off just shipping e.g. a single README file in\n> hooks/, or just nothing at all.\n\nFWIW, that's my opinion, too (including the \"hill to die on\" part).\n\nI also wish hooks were just shell snippets in the config files that\ncould follow the usual config-precedence rules.\n\n-Peff\n"},{"id":"349001","messageId":"20180601143823.h7fvri25q7om4whn@LykOS.localdomain","threadId":"48585","inReplyTo":"20180601070609.GC15578@sigill.intra.peff.net","subject":"Re: does a new repo actually *need* default template content?","fromName":"Santiago Torres","fromEmail":"santiago@nyu.edu","sentAt":"2018-06-01T14:38:25Z","receivedAt":"2018-06-01T14:36:20Z","isPatch":false,"sender":{"key":"santiago@nyu.edu","avatar":"https://avatars.githubusercontent.com/u/3579933?v=4"},"body":"On Fri, Jun 01, 2018 at 03:06:10AM -0400, Jeff King wrote:\n> On Mon, May 28, 2018 at 07:56:12PM +0200, Ævar Arnfjörð Bjarmason wrote:\n> \n> > \n> > On Mon, May 28 2018, Robert P. J. Day wrote:\n> > \n> > >   (apologies for more pedantic nitpickery, just little things i'm\n> > > running across in my travels. aside: i actually teach git courses, so\n> > > it's a bit embarrassing that i don't know some of this stuff. *sigh*.)\n> > \n> > Aside from maybe the empty branches/ directory (see c8a58ac5a5 (\"Revert\n> > \"Don't create the $GIT_DIR/branches directory on init\"\", 2009-10-31)),\n> > none of this is needed.\n> > \n> > I wish we didn't create any of this stuff, but have never been inclined\n> > to make that my hill to die on.\n> > \n> > I think we're much better off just shipping e.g. a single README file in\n> > hooks/, or just nothing at all.\n> \n> FWIW, that's my opinion, too (including the \"hill to die on\" part).\n> \n\n+1. It'd probably be worth having the sample hooks be part of the\ninstallation, but not as part of every repository (e.g., hold them under\n/usr/share/git/samples/hooks/ or something along those lines).\n\n> I also wish hooks were just shell snippets in the config files that\n> could follow the usual config-precedence rules.\n\nI like this idea, but I'd probably keep the snippets in a separate file\nto keep things clean.\n\nThanks,\n-Santiago.\n"}]}