git/templates
Alex Vandiver c87fbcf761 fsmonitor: don't bother pretty-printing JSON from watchman
This provides modest performance savings.  Benchmarking with the
following program, with and without `--no-pretty`, we find savings of
23% (0.316s -> 0.242s) in the git repository, and savings of 8% (5.24s
-> 4.86s) on a large repository with 580k files in the working copy.

    #!/usr/bin/perl

    use strict;
    use warnings;
    use IPC::Open2;
    use JSON::XS;

    my $pid = open2(\*CHLD_OUT, \*CHLD_IN, "watchman -j @ARGV")
        or die "open2() failed: $!\n" .
        "Falling back to scanning...\n";

    my $query = qq|["query", "$ENV{PWD}", {}]|;

    print CHLD_IN $query;
    close CHLD_IN;
    my $response = do {local $/; <CHLD_OUT>};

    JSON::XS->new->utf8->decode($response);

Signed-off-by: Alex Vandiver <alexmv@dropbox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-10-30 11:45:56 +09:00
..
.gitignore
branches-- Revert "Don't create the $GIT_DIR/branches directory on init" 2009-10-31 11:16:50 -07:00
hooks--applypatch-msg.sample *.sh: avoid hardcoding $GIT_DIR/hooks/... 2014-12-01 11:00:13 -08:00
hooks--commit-msg.sample Modernize git calling conventions in hook templates 2010-03-20 09:04:38 -07:00
hooks--fsmonitor-watchman.sample fsmonitor: don't bother pretty-printing JSON from watchman 2017-10-30 11:45:56 +09:00
hooks--post-update.sample Modernize git calling conventions in hook templates 2010-03-20 09:04:38 -07:00
hooks--pre-applypatch.sample *.sh: avoid hardcoding $GIT_DIR/hooks/... 2014-12-01 11:00:13 -08:00
hooks--pre-commit.sample sample pre-commit hook: use --bool when retrieving config var 2013-09-24 12:26:49 -07:00
hooks--pre-push.sample pre-push.sample: remove unnecessary and misleading IFS=' ' 2014-12-22 10:27:42 -08:00
hooks--pre-rebase.sample treewide: correct several "up-to-date" to "up to date" 2017-08-23 12:17:22 -07:00
hooks--pre-receive.sample pre-receive.sample: mark it executable 2016-10-28 14:21:11 -07:00
hooks--prepare-commit-msg.sample hook: use correct logical variable 2017-08-14 11:19:50 -07:00
hooks--update.sample templates/hooks: fix minor typo in the sample update-hook 2016-02-25 09:32:20 -08:00
info--exclude Modernize git calling conventions in hook templates 2010-03-20 09:04:38 -07:00
Makefile Make templates honour SHELL_PATH and PERL_PATH 2010-03-20 09:03:52 -07:00
this--description Modify description file to say what this file is 2009-03-04 00:56:52 -08:00