From: Junio C Hamano Date: Mon, 29 Aug 2022 21:55:12 +0000 (-0700) Subject: Merge branch 'vd/scalar-enables-fsmonitor' X-Git-Tag: v2.38.0-rc0~56 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bc820cf9e6b529b07d95000f1ca60827b855182b;p=thirdparty%2Fgit.git Merge branch 'vd/scalar-enables-fsmonitor' "scalar" now enables built-in fsmonitor on enlisted repositories, when able. * vd/scalar-enables-fsmonitor: scalar: update technical doc roadmap with FSMonitor support scalar unregister: stop FSMonitor daemon scalar: enable built-in FSMonitor on `register` scalar: move config setting logic into its own function scalar-delete: do not 'die()' in 'delete_enlistment()' scalar-[un]register: clearly indicate source of error scalar-unregister: handle error codes greater than 0 scalar: constrain enlistment search --- bc820cf9e6b529b07d95000f1ca60827b855182b diff --cc Documentation/technical/scalar.txt index f6353375f0,047390e46e..0600150b3a --- a/Documentation/technical/scalar.txt +++ b/Documentation/technical/scalar.txt @@@ -84,20 -84,26 +84,23 @@@ series have been accepted - `scalar-diagnose`: The `scalar` command is taught the `diagnose` subcommand. +- `scalar-generalize-diagnose`: Move the functionality of `scalar diagnose` + into `git diagnose` and `git bugreport --diagnose`. + + - 'scalar-add-fsmonitor: Enable the built-in FSMonitor in Scalar + enlistments. At the end of this series, Scalar should be feature-complete + from the perspective of a user. + Roughly speaking (and subject to change), the following series are needed to "finish" this initial version of Scalar: - - Finish Scalar features: Enable the built-in FSMonitor in Scalar enlistments - and implement `scalar help`. At the end of this series, Scalar should be - feature-complete from the perspective of a user. -- Generalize features not specific to Scalar: In the spirit of making Scalar - configure only what is needed for large repo performance, move common - utilities into other parts of Git. Some of this will be internal-only, but one - major change will be generalizing `scalar diagnose` for use with any Git - repository. -- - Move Scalar to toplevel: Move Scalar out of `contrib/` and into the root of - `git`, including updates to build and install it with the rest of Git. This - change will incorporate Scalar into the Git CI and test framework, as well as - expand regression and performance testing to ensure the tool is stable. + `git`. This includes a variety of related updates, including: + - building & installing Scalar in the Git root-level 'make [install]'. + - builing & testing Scalar as part of CI. + - moving and expanding test coverage of Scalar (including perf tests). + - implementing 'scalar help'/'git help scalar' to display scalar + documentation. Finally, there are two additional patch series that exist in Microsoft's fork of Git, but there is no current plan to upstream them. There are some interesting diff --cc contrib/scalar/scalar.c index 68571ce195,07c3f7dd6b..642d16124e --- a/contrib/scalar/scalar.c +++ b/contrib/scalar/scalar.c @@@ -11,22 -14,9 +14,7 @@@ #include "dir.h" #include "packfile.h" #include "help.h" -#include "archive.h" -#include "object-store.h" - /* - * Remove the deepest subdirectory in the provided path string. Path must not - * include a trailing path separator. Returns 1 if parent directory found, - * otherwise 0. - */ - static int strbuf_parent_directory(struct strbuf *buf) - { - size_t len = buf->len; - size_t offset = offset_1st_component(buf->buf); - char *path_sep = find_last_dir_sep(buf->buf + offset); - strbuf_setlen(buf, path_sep ? path_sep - buf->buf : offset); - - return buf->len < len; - } - static void setup_enlistment_directory(int argc, const char **argv, const char * const *usagestr, const struct option *options,