why does builtin/init-db.c mention "/etc/core-git/templates/hooks/update"?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



  just noticed this in builtin/init-db.c:

... snip ...
#ifndef DEFAULT_GIT_TEMPLATE_DIR
#define DEFAULT_GIT_TEMPLATE_DIR "/usr/share/git-core/templates"
#endif
... snip ...
static void copy_templates_1(struct strbuf *path, struct strbuf *template_path,
                             DIR *dir)
{
        size_t path_baselen = path->len;
        size_t template_baselen = template_path->len;
        struct dirent *de;

        /* Note: if ".git/hooks" file exists in the repository being
         * re-initialized, /etc/core-git/templates/hooks/update would
         * cause "git init" to fail here.  I think this is sane but
         * it means that the set of templates we ship by default, along
         * with the way the namespace under .git/ is organized, should
         * be really carefully chosen.
         */
... snip ...

  should the reference to /etc/core-git/templates/hooks/update instead
refer to the directory /usr/share/git-core/templates/..., given the
default directory defined just a few lines above it? (there is no such
directory, /etc/core-git/, on my system.)

  more to the point, is that actually what the "update" hook does? i
just looked at the shipped sample, "update.sample", and it seems to be
related to tags:

  #!/bin/sh
  #
  # An example hook script to block unannotated tags from entering.
  # Called by "git receive-pack" with arguments: refname sha1-old sha1-new
  #
  # To enable this hook, rename this file to "update".

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                  http://crashcourse.ca/dokuwiki

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux