Re: [PATCH 1/2] Add `init-db.templatedir` configuration variable.

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

 



Steven Drake <sdrake@xxxxxxxxxx> writes:

> Include `init.templatedir` as an alias for `init-db.templatedir`.

This describes what the patch adds, which we can read in the diff *if* we
wanted to.  The primary job of the first paragraph of the proposed commit
log message is to convince reviewers why it might be worthwhile to read
the diff, and to explain whoever reads "git log" output in the future what
motivated this change to be made.

Your log message doesn't say anything about why it is a good idea to add
this feature, which is much more important to talk about [*1*].

The target _may_ be probably to have this in $HOME/.gitconfig so that your
personal templates in $HOME/.gittemplate/ are used in all repositories you
will create.  But you shouldn't make me, anybody who reviews, or readers
of the documentation for that matter, *guess* what problem the new feature
is meant to solve.

IOW, code talks what it itself does, but it often cannot say why it does
what it does, nor why a particular way it does what it does was chosen.
You help your code justify itself by describing the motivation in your
commit log message.

I don't think init-db.templatedir is needed nor wanted.

 - People who learn about this configuration will never heard of init-db
  (i.e. lack of necessity);

 - We have already deprecated init-db and do not advertise in "git help
   git"---the longer term direction is to remove it once everybody forgets
   about it (i.e. actively undesirable).

By the way, this is probably less useful in /etc/gitconfig, as somebody
who can configure it can customize the system-wide templates with the same
ease.  That might also be something you would want to mention in the log.

[Footnote]

*1* I am not saying the commit log message shouldn't talk about what it
does or how it does it.  It also is a good thing to do, especially when
the linkage between the motivation and the implementation is not obvious.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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]