<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/templates, branch v2.24.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.24.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.24.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2019-08-07T19:37:33Z</updated>
<entry>
<title>git-merge: honor pre-merge-commit hook</title>
<updated>2019-08-07T19:37:33Z</updated>
<author>
<name>Michael J Gruber</name>
<email>git@drmicha.warpmail.net</email>
</author>
<published>2019-08-07T18:57:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6098817fd7f64209664c701df30096dc0f4fb876'/>
<id>urn:sha1:6098817fd7f64209664c701df30096dc0f4fb876</id>
<content type='text'>
git-merge does not honor the pre-commit hook when doing automatic merge
commits, and for compatibility reasons this is going to stay.

Introduce a pre-merge-commit hook which is called for an automatic merge
commit just like pre-commit is called for a non-automatic merge commit
(or any other commit).

[js: * renamed hook from "pre-merge" to "pre-merge-commit"
     * only discard the index if the hook is actually present
     * expanded githooks documentation entry
     * clarified that hook should write messages to stderr
     * squashed test changes from the original series' patch 4/4
     * modified tests to follow new pattern from this series' patch 1/4
     * added a test case for non-executable merge hooks
     * added a test case for failed merges
     * when testing that the merge hook did not run, make sure we
       actually have a merge to perform (by resetting the "side" branch
       to its original state).
     * reworded commit message
]

Improved-by: Martin Ågren &lt;martin.agren@gmail.com&gt;
Signed-off-by: Michael J Gruber &lt;git@grubix.eu&gt;
Signed-off-by: Martin Ågren &lt;martin.agren@gmail.com&gt;
Signed-off-by: Josh Steadmon &lt;steadmon@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Update shell scripts to compute empty tree object ID</title>
<updated>2018-05-02T04:59:53Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2018-05-02T00:26:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=03a7f388dafaee0aa084144efe7a8f9c151e5221'/>
<id>urn:sha1:03a7f388dafaee0aa084144efe7a8f9c151e5221</id>
<content type='text'>
Several of our shell scripts hard-code the object ID of the empty tree.
To avoid any problems when changing hashes, compute this value on
startup of the script.  For performance, store the value in a variable
and reuse it throughout the life of the script.

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>fsmonitor: simplify determining the git worktree under Windows</title>
<updated>2017-11-13T01:02:20Z</updated>
<author>
<name>Ben Peart</name>
<email>benpeart@microsoft.com</email>
</author>
<published>2017-11-10T21:03:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1fff303fc2b31d5005f38f55f38c4e8521da5a93'/>
<id>urn:sha1:1fff303fc2b31d5005f38f55f38c4e8521da5a93</id>
<content type='text'>
Simplify and speed up the process of finding the git worktree when
running on Windows by keeping it in perl and avoiding spawning helper
processes.

Signed-off-by: Ben Peart &lt;benpeart@microsoft.com&gt;
Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>fsmonitor: read from getcwd(), not the PWD environment variable</title>
<updated>2017-11-10T05:04:50Z</updated>
<author>
<name>Alex Vandiver</name>
<email>alexmv@dropbox.com</email>
</author>
<published>2017-11-09T19:58:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6f1dc21d983a495877c8054d41d9b634e234ccc4'/>
<id>urn:sha1:6f1dc21d983a495877c8054d41d9b634e234ccc4</id>
<content type='text'>
Though the process has chdir'd to the root of the working tree, the
PWD environment variable is only guaranteed to be updated accordingly
if a shell is involved -- which is not guaranteed to be the case.
That is, if `/usr/bin/perl` is a binary, $ENV{PWD} is unchanged from
whatever spawned `git` -- if `/usr/bin/perl` is a trivial shell
wrapper to the real `perl`, `$ENV{PWD}` will have been updated to the
root of the working copy.

Update to read from the Cwd module using the `getcwd` syscall, not the
PWD environment variable.  The Cygwin case is left unchanged, as it
necessarily _does_ go through a shell.

Signed-off-by: Alex Vandiver &lt;alexmv@dropbox.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>fsmonitor: don't bother pretty-printing JSON from watchman</title>
<updated>2017-10-30T02:45:56Z</updated>
<author>
<name>Alex Vandiver</name>
<email>alexmv@dropbox.com</email>
</author>
<published>2017-10-27T23:26:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c87fbcf7614a064877cd0323f0ed31840fed9c0c'/>
<id>urn:sha1:c87fbcf7614a064877cd0323f0ed31840fed9c0c</id>
<content type='text'>
This provides modest performance savings.  Benchmarking with the
following program, with and without `--no-pretty`, we find savings of
23% (0.316s -&gt; 0.242s) in the git repository, and savings of 8% (5.24s
-&gt; 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 $/; &lt;CHLD_OUT&gt;};

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

Signed-off-by: Alex Vandiver &lt;alexmv@dropbox.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>fsmonitor: read entirety of watchman output</title>
<updated>2017-10-04T09:58:53Z</updated>
<author>
<name>Alex Vandiver</name>
<email>alexmv@dropbox.com</email>
</author>
<published>2017-10-04T06:27:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2a387b17c5bc5e0872bed352a41a2b312ea86f9b'/>
<id>urn:sha1:2a387b17c5bc5e0872bed352a41a2b312ea86f9b</id>
<content type='text'>
In Perl, setting $/ sets the string that is used as the "record
separator," which sets the boundary that the `&lt;&gt;` construct reads to.
Setting `local $/ = 0666;` evaluates the octal, getting 438, and
stringifies it.  Thus, the later read from `&lt;CHLD_OUT&gt;` stops as soon
as it encounters the string "438" in the watchman output, yielding
invalid JSON; repositories containing filenames with SHA1 hashes are
able to trip this easily.

Set `$/` to undefined, thus slurping all output from watchman.  Also
close STDIN which is provided to watchman, to better guarantee that we
cannot deadlock with watchman while both attempting to read.

Signed-off-by: Alex Vandiver &lt;alexmv@dropbox.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>fsmonitor: MINGW support for watchman integration</title>
<updated>2017-10-04T02:10:24Z</updated>
<author>
<name>Ben Peart</name>
<email>benpeart@microsoft.com</email>
</author>
<published>2017-10-04T02:09:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dcdb71f1599734ae46870d3eca11e2093bbd7520'/>
<id>urn:sha1:dcdb71f1599734ae46870d3eca11e2093bbd7520</id>
<content type='text'>
Instead of just taking $ENV{'PWD'}, use the same logic that converts
PWD to $git_work_tree on MSYS_NT in the watchman integration hook
script also on MINGW.

Signed-off-by: Ben Peart &lt;benpeart@microsoft.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>fsmonitor: add a sample integration script for Watchman</title>
<updated>2017-10-01T08:23:05Z</updated>
<author>
<name>Ben Peart</name>
<email>benpeart@microsoft.com</email>
</author>
<published>2017-09-22T16:35:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=def4376711f607914bfb784f8de21867062fa284'/>
<id>urn:sha1:def4376711f607914bfb784f8de21867062fa284</id>
<content type='text'>
This script integrates the new fsmonitor capabilities of git with the
cross platform Watchman file watching service. To use the script:

Download and install Watchman from https://facebook.github.io/watchman/.
Rename the sample integration hook from fsmonitor-watchman.sample to
fsmonitor-watchman. Configure git to use the extension:

git config core.fsmonitor .git/hooks/fsmonitor-watchman

Optionally turn on the untracked cache for optimal performance.

Signed-off-by: Ben Peart &lt;benpeart@microsoft.com&gt;
Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Christian Couder &lt;christian.couder@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ma/up-to-date'</title>
<updated>2017-09-10T08:08:22Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-09-10T08:08:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8e36002adda45a35c6fc4daf81913c3d2102cb59'/>
<id>urn:sha1:8e36002adda45a35c6fc4daf81913c3d2102cb59</id>
<content type='text'>
Message and doc updates.

* ma/up-to-date:
  treewide: correct several "up-to-date" to "up to date"
  Documentation/user-manual: update outdated example output
</content>
</entry>
<entry>
<title>Merge branch 'ks/prepare-commit-msg-sample-fix'</title>
<updated>2017-08-23T21:13:07Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-08-23T21:13:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=75010153e95f2b340f841953e3a0ce269ccf394f'/>
<id>urn:sha1:75010153e95f2b340f841953e3a0ce269ccf394f</id>
<content type='text'>
An "oops" fix to a topic that is already in 'master'.

* ks/prepare-commit-msg-sample-fix:
  hook: use correct logical variable
</content>
</entry>
</feed>
