From: Junio C Hamano <gitster@pobox.com>
To: Alex Cornejo <acornejo@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: git init with template dir
Date: Fri, 12 Jun 2015 08:27:24 -0700 [thread overview]
Message-ID: <xmqqioatdk0z.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <loom.20150612T085835-977@post.gmane.org> (Alex Cornejo's message of "Fri, 12 Jun 2015 07:09:18 +0000 (UTC)")
Alex Cornejo <acornejo@gmail.com> writes:
> I was surprised to see that when using git-init, if the template folder
> is itself a symlink, then the contents of the template is NOT copied to
> the resulting git repository, but instead each individual file is
> symlinked.
Hmmm, I do not seem to be able to do this, though.
$ ln -s $HOME/g/share/git-core/templates /var/tmp/git-template
$ cd /var/tmp
$ git init --template=/var/tmp/git-template new
$ find new/.git -type l
... nothing ...
> For my particular use case, this is undesirable (since if I am not
> careful, then when I change the hook of one git repo, it
> actually changes the hooks of all other repos too). It is easy
> enough for me to work around this (i.e. by instead pointing my gitconfig
> to use a template dir which is not a symlink), but I was
> wondering weather this is a feature folks use (and for what end), or if
> this is unintended behavior.
That you had to predicate "this is undesireable" with "For my
particular use case" tells me that other people may want to see that
these things shared and automatically receive updates when the
originals in the temporate directory are updated, which makes it
sound like a "feature" not an "unintended behaviour", at least to
me.
next prev parent reply other threads:[~2015-06-12 15:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-12 7:09 git init with template dir Alex Cornejo
2015-06-12 15:27 ` Junio C Hamano [this message]
2015-06-12 15:59 ` Alex Cornejo
2015-06-12 16:13 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqioatdk0z.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=acornejo@gmail.com \
--cc=git@vger.kernel.org \
/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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.