<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/git.c, branch v2.36.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.36.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.36.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2022-03-25T23:04:15Z</updated>
<entry>
<title>fsmonitor--daemon: add a built-in fsmonitor daemon</title>
<updated>2022-03-25T23:04:15Z</updated>
<author>
<name>Jeff Hostetler</name>
<email>jeffhost@microsoft.com</email>
</author>
<published>2022-03-25T18:02:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=16d9d6175b53ca6197831da78ca8fb0dedb961b6'/>
<id>urn:sha1:16d9d6175b53ca6197831da78ca8fb0dedb961b6</id>
<content type='text'>
Create a built-in file system monitoring daemon that can be used by
the existing `fsmonitor` feature (protocol API and index extension)
to improve the performance of various Git commands, such as `status`.

The `fsmonitor--daemon` feature builds upon the `Simple IPC` API and
provides an alternative to hook access to existing fsmonitors such
as `watchman`.

This commit merely adds the new command without any functionality.

Co-authored-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Jeff Hostetler &lt;jeffhost@microsoft.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ab/grep-patterntype'</title>
<updated>2022-02-25T23:47:36Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-02-25T23:47:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5b84280c65bef19bc3a810e17474c9861ea7ce89'/>
<id>urn:sha1:5b84280c65bef19bc3a810e17474c9861ea7ce89</id>
<content type='text'>
Some code clean-up in the "git grep" machinery.

* ab/grep-patterntype:
  grep: simplify config parsing and option parsing
  grep.c: do "if (bool &amp;&amp; memchr())" not "if (memchr() &amp;&amp; bool)"
  grep.h: make "grep_opt.pattern_type_option" use its enum
  grep API: call grep_config() after grep_init()
  grep.c: don't pass along NULL callback value
  built-ins: trust the "prefix" from run_builtin()
  grep tests: add missing "grep.patternType" config tests
  grep tests: create a helper function for "BRE" or "ERE"
  log tests: check if grep_config() is called by "log"-like cmds
  grep.h: remove unused "regex_t regexp" from grep_opt
</content>
</entry>
<entry>
<title>built-ins: trust the "prefix" from run_builtin()</title>
<updated>2022-02-16T02:00:50Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2022-02-16T00:00:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9725c8dda20dc9bc02b552a2333963c8cb834d1d'/>
<id>urn:sha1:9725c8dda20dc9bc02b552a2333963c8cb834d1d</id>
<content type='text'>
Change code in "builtin/grep.c" and "builtin/ls-tree.c" to trust the
"prefix" passed from "run_builtin()". The "prefix" we get from setup.c
is either going to be NULL or a string of length &gt;0, never "".

So we can drop the "prefix &amp;&amp; *prefix" checks added for
"builtin/grep.c" in 0d042fecf2f (git-grep: show pathnames relative to
the current directory, 2006-08-11), and for "builtin/ls-tree.c" in
a69dd585fca (ls-tree: chomp leading directories when run from a
subdirectory, 2005-12-23).

As seen in code in revision.c that was added in cd676a51367 (diff
--relative: output paths as relative to the current subdirectory,
2008-02-12) we already have existing code that does away with this
assertion.

This makes it easier to reason about a subsequent change to the
"prefix_length" code in grep.c in a subsequent commit, and since we're
going to the trouble of doing that let's leave behind an assert() to
promise this to any future callers.

For "builtin/grep.c" it would be painful to pass the "prefix" down the
callchain of:

    cmd_grep -&gt; grep_tree -&gt; grep_submodule -&gt; grep_cache -&gt; grep_oid -&gt;
    grep_source_name

So for the code that needs it in grep_source_name() let's add a
"grep_prefix" variable similar to the existing "ls_tree_prefix".

While at it let's move the code in cmd_ls_tree() around so that we
assign to the "ls_tree_prefix" right after declaring the variables,
and stop assigning to "prefix". We only subsequently used that
variable later in the function after clobbering it. Let's just use our
own "grep_prefix" instead.

Let's also add an assert() in git.c, so that we'll make this promise
about the "prefix" to any current and future callers, as well as to
any readers of the code.

Code history:

 * The strlen() in "grep.c" hasn't been used since 493b7a08d80 (grep:
   accept relative paths outside current working directory, 2009-09-05).

   When that code was added in 0d042fecf2f (git-grep: show pathnames
   relative to the current directory, 2006-08-11) we used the length.

   But since 493b7a08d80 we haven't used it for anything except a
   boolean check that we could have done on the "prefix" member
   itself.

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ab/config-based-hooks-2'</title>
<updated>2022-02-09T22:21:00Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-02-09T22:21:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c70bc338e9a35b45263c3c68913ad516e9e70d62'/>
<id>urn:sha1:c70bc338e9a35b45263c3c68913ad516e9e70d62</id>
<content type='text'>
More "config-based hooks".

* ab/config-based-hooks-2:
  run-command: remove old run_hook_{le,ve}() hook API
  receive-pack: convert push-to-checkout hook to hook.h
  read-cache: convert post-index-change to use hook.h
  commit: convert {pre-commit,prepare-commit-msg} hook to hook.h
  git-p4: use 'git hook' to run hooks
  send-email: use 'git hook run' for 'sendemail-validate'
  git hook run: add an --ignore-missing flag
  hooks: convert worktree 'post-checkout' hook to hook library
  hooks: convert non-worktree 'post-checkout' hook to hook library
  merge: convert post-merge to use hook.h
  am: convert applypatch-msg to use hook.h
  rebase: convert pre-rebase to use hook.h
  hook API: add a run_hooks_l() wrapper
  am: convert {pre,post}-applypatch to use hook.h
  gc: use hook library for pre-auto-gc hook
  hook API: add a run_hooks() wrapper
  hook: add 'run' subcommand
</content>
</entry>
<entry>
<title>hook: add 'run' subcommand</title>
<updated>2022-01-07T23:19:34Z</updated>
<author>
<name>Emily Shaffer</name>
<email>emilyshaffer@google.com</email>
</author>
<published>2021-12-22T03:59:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=96e7225b310cb45a9b1198fb7bb1621e638e3329'/>
<id>urn:sha1:96e7225b310cb45a9b1198fb7bb1621e638e3329</id>
<content type='text'>
In order to enable hooks to be run as an external process, by a
standalone Git command, or by tools which wrap Git, provide an external
means to run all configured hook commands for a given hook event.

Most of our hooks require more complex functionality than this, but
let's start with the bare minimum required to support our simplest
hooks.

In terms of implementation the usage_with_options() and "goto usage"
pattern here mirrors that of
builtin/{commit-graph,multi-pack-index}.c.

Some of the implementation here, such as a function being named
run_hooks_opt() when it's tasked with running one hook, to using the
run_processes_parallel_tr2() API to run with jobs=1 is somewhere
between a bit odd and and an overkill for the current features of this
"hook run" command and the hook.[ch] API.

This code will eventually be able to run multiple hooks declared in
config in parallel, by starting out with these names and APIs we
reduce the later churn of renaming functions, switching from the
run_command() to run_processes_parallel_tr2() API etc.

Signed-off-by: Emily Shaffer &lt;emilyshaffer@google.com&gt;
Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Acked-by: Emily Shaffer &lt;emilyshaffer@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>i18n: factorize "no directory given for --foo"</title>
<updated>2022-01-05T21:31:00Z</updated>
<author>
<name>Jean-Noël Avila</name>
<email>jn.avila@free.fr</email>
</author>
<published>2022-01-05T20:02:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=986cd6556c000a460d499fafb7cd0a8d9220b57d'/>
<id>urn:sha1:986cd6556c000a460d499fafb7cd0a8d9220b57d</id>
<content type='text'>
Signed-off-by: Jean-Noël Avila &lt;jn.avila@free.fr&gt;
Reviewed-by: Johannes Sixt &lt;j6t@kdbg.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ld/sparse-diff-blame'</title>
<updated>2021-12-21T23:03:17Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-12-21T23:03:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8d2c37320bd01bbce4b88365c160bc4a542bee48'/>
<id>urn:sha1:8d2c37320bd01bbce4b88365c160bc4a542bee48</id>
<content type='text'>
Teach diff and blame to work well with sparse index.

* ld/sparse-diff-blame:
  blame: enable and test the sparse index
  diff: enable and test the sparse index
  diff: replace --staged with --cached in t1092 tests
  repo-settings: prepare_repo_settings only in git repos
  test-read-cache: set up repo after git directory
  commit-graph: return if there is no git directory
  git: ensure correct git directory setup with -h
</content>
</entry>
<entry>
<title>git: ensure correct git directory setup with -h</title>
<updated>2021-12-06T17:55:05Z</updated>
<author>
<name>Lessley Dennington</name>
<email>lessleydennington@gmail.com</email>
</author>
<published>2021-12-06T15:55:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e5b17bda8b6c830aa65f8c52e08755cae5b815a1'/>
<id>urn:sha1:e5b17bda8b6c830aa65f8c52e08755cae5b815a1</id>
<content type='text'>
Ensure correct git directory setup when -h is passed with commands. This
specifically applies to repos with special help text configuration
variables and to commands run with -h outside a repository. This
will also protect against test failures in the upcoming change to BUG in
prepare_repo_settings if no git directory exists.

Note: this diff is better seen when ignoring whitespace changes.

Co-authored-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Lessley Dennington &lt;lessleydennington@gmail.com&gt;
Reviewed-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'js/retire-preserve-merges'</title>
<updated>2021-10-18T22:47:56Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-10-18T22:47:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=223a1bfb5821387981c700654e4edd2443c5a7fc'/>
<id>urn:sha1:223a1bfb5821387981c700654e4edd2443c5a7fc</id>
<content type='text'>
The "--preserve-merges" option of "git rebase" has been removed.

* js/retire-preserve-merges:
  sequencer: restrict scope of a formerly public function
  rebase: remove a no-longer-used function
  rebase: stop mentioning the -p option in comments
  rebase: remove obsolete code comment
  rebase: drop the internal `rebase--interactive` command
  git-svn: drop support for `--preserve-merges`
  rebase: drop support for `--preserve-merges`
  pull: remove support for `--rebase=preserve`
  tests: stop testing `git rebase --preserve-merges`
  remote: warn about unhandled branch.&lt;name&gt;.rebase values
  t5520: do not use `pull.rebase=preserve`
</content>
</entry>
<entry>
<title>rebase: drop the internal `rebase--interactive` command</title>
<updated>2021-09-08T04:45:33Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2021-09-07T21:05:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5b55b32bd2c36fea43f516fa36f8276655954f40'/>
<id>urn:sha1:5b55b32bd2c36fea43f516fa36f8276655954f40</id>
<content type='text'>
It was only used by the `--preserve-merges` backend, which we just
removed.

Helped-by: Alban Gruin &lt;alban.gruin@gmail.com&gt;
Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Reviewed-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
