Re: [PATCH] pre-commit.sample: don't print incidental SHA1

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

 



Jim Meyering <jim@xxxxxxxxxxxx> writes:

> I enabled the sample pre-commit hook and was surprised to
> see new output with every commit.  It was due to that script's
> use of git-rev-parse.

Thanks.  I am half surprised that nobody has complained about this,
because the problem has been there since early 2006, and am half
unsurprised because I have long suspected that nobody would be using
pre-commit hook in real life.

> Also, I noticed the use of "git-hyphen" git-rev-parse.
> Perhaps that hyphen has been left in deliberately,
> for portability to very old versions of git?

Sample hooks do use features available only in the version of git that
ships them; we do not strive to retain such a portability in that sense.

The hook scripts are special in that they are invoked in an environment in
which the git subcommands in their dashed form are always available on its
$PATH.  People tend to learn by looking at examples, so it is a good idea
to change them to use the new, separate subcommand, form to set examples.

But that is obviously a much wider patch, so let's make that a separate
issue.
--
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]