-
Notifications
You must be signed in to change notification settings - Fork 164
Upstreaming the Scalar command #1005
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
3a2e282
50160d6
74cd641
37231a4
4439ab4
3760560
c865e89
3f8b0ab
60659c4
45aca84
15e649a
2a3fb40
efd808a
8b69462
b5f416d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| /*.exe | ||
| /scalar |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| QUIET_SUBDIR0 = +$(MAKE) -C # space to separate -C and subdir | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On the Git mailing list, Ævar Arnfjörð Bjarmason wrote (reply to this): There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On the Git mailing list, Ævar Arnfjörð Bjarmason wrote (reply to this): |
||
| QUIET_SUBDIR1 = | ||
|
|
||
| ifneq ($(findstring s,$(MAKEFLAGS)),s) | ||
| ifndef V | ||
| QUIET_GEN = @echo ' ' GEN $@; | ||
| QUIET_SUBDIR0 = +@subdir= | ||
| QUIET_SUBDIR1 = ;$(NO_SUBDIR) echo ' ' SUBDIR $$subdir; \ | ||
| $(MAKE) $(PRINT_DIR) -C $$subdir | ||
| else | ||
| export V | ||
| endif | ||
| endif | ||
|
|
||
| all: | ||
|
|
||
| include ../../config.mak.uname | ||
| -include ../../config.mak.autogen | ||
| -include ../../config.mak | ||
|
|
||
| TARGETS = scalar$(X) scalar.o | ||
| GITLIBS = ../../common-main.o ../../libgit.a ../../xdiff/lib.a | ||
|
|
||
| all: scalar$(X) ../../bin-wrappers/scalar | ||
|
|
||
| $(GITLIBS): | ||
| $(QUIET_SUBDIR0)../.. $(QUIET_SUBDIR1) $(subst ../../,,$@) | ||
|
|
||
| $(TARGETS): $(GITLIBS) scalar.c | ||
| $(QUIET_SUBDIR0)../.. $(QUIET_SUBDIR1) $(patsubst %,contrib/scalar/%,$@) | ||
|
|
||
| clean: | ||
| $(RM) $(TARGETS) ../../bin-wrappers/scalar | ||
|
|
||
| ../../bin-wrappers/scalar: ../../wrap-for-bin.sh Makefile | ||
| @mkdir -p ../../bin-wrappers | ||
| $(QUIET_GEN)sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \ | ||
| -e 's|@@BUILD_DIR@@|$(shell cd ../.. && pwd)|' \ | ||
| -e 's|@@PROG@@|contrib/scalar/scalar$(X)|' < $< > $@ && \ | ||
| chmod +x $@ | ||
|
|
||
| test: all | ||
| $(MAKE) -C t | ||
|
|
||
| .PHONY: $(GITLIBS) all clean test FORCE | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| # Scalar - an opinionated repository management tool | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On the Git mailing list, Derrick Stolee wrote (reply to this): There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On the Git mailing list, Johannes Schindelin wrote (reply to this): |
||
|
|
||
| Scalar is an add-on to Git that helps users take advantage of advanced | ||
| performance features in Git. Originally implemented in C# using .NET Core, | ||
| based on the learnings from the VFS for Git project, most of the techniques | ||
| developed by the Scalar project have been integrated into core Git already: | ||
|
|
||
| * partial clone, | ||
| * commit graphs, | ||
| * multi-pack index, | ||
| * sparse checkout (cone mode), | ||
| * scheduled background maintenance, | ||
| * etc | ||
|
|
||
| This directory contains the remaining parts of Scalar that are not (yet) in | ||
| core Git. | ||
|
|
||
| ## Roadmap | ||
|
|
||
| The idea is to populate this directory via incremental patch series and | ||
| eventually move to a top-level directory next to `gitk-git/` and to `git-gui/`. The | ||
| current plan involves the following patch series: | ||
|
|
||
| - `scalar-the-beginning`: The initial patch series which sets up | ||
| `contrib/scalar/` and populates it with a minimal `scalar` command that | ||
| demonstrates the fundamental ideas. | ||
|
|
||
| - `scalar-c-and-C`: The `scalar` command learns about two options that can be | ||
| specified before the command, `-c <key>=<value>` and `-C <directory>`. | ||
|
|
||
| - `scalar-diagnose`: The `scalar` command is taught the `diagnose` subcommand. | ||
|
|
||
| - `scalar-and-builtin-fsmonitor`: The built-in FSMonitor is enabled in `scalar | ||
| register` and in `scalar clone`, for an enormous performance boost when | ||
| working in large worktrees. This patch series necessarily depends on Jeff | ||
| Hostetler's FSMonitor patch series to be integrated into Git. | ||
|
|
||
| - `scalar-gentler-config-locking`: Scalar enlistments are registered in the | ||
| user's Git config. This usually does not represent any problem because it is | ||
| rare for a user to register an enlistment. However, in Scalar's functional | ||
| tests, Scalar enlistments are created galore, and in parallel, which can lead | ||
| to lock contention. This patch series works around that problem by re-trying | ||
| to lock the config file in a gentle fashion. | ||
|
|
||
| - `scalar-extra-docs`: Add some extensive documentation that has been written | ||
| in the original Scalar project (all subject to discussion, of course). | ||
|
|
||
| - `optionally-install-scalar`: Now that Scalar is feature (and documentation) | ||
| complete and is verified in CI builds, let's offer to install it. | ||
|
|
||
| - `move-scalar-to-toplevel`: Now that Scalar is complete, let's move it next to | ||
| `gitk-git/` and to `git-gui/`, making it a top-level command. | ||
|
|
||
| The following two patch series exist in Microsoft's fork of Git and are | ||
| publicly available. There is no current plan to upstream them, not because I | ||
| want to withhold these patches, but because I don't think the Git community is | ||
| interested in these patches. | ||
|
|
||
| There are some interesting ideas there, but the implementation is too specific | ||
| to Azure Repos and/or VFS for Git to be of much help in general (and also: my | ||
| colleagues tried to upstream some patches already and the enthusiasm for | ||
| integrating things related to Azure Repos and VFS for Git can be summarized in | ||
| very, very few words). | ||
|
|
||
| These still exist mainly because the GVFS protocol is what Azure Repos has | ||
| instead of partial clone, while Git is focused on improving partial clone: | ||
|
|
||
| - `scalar-with-gvfs`: The primary purpose of this patch series is to support | ||
| existing Scalar users whose repositories are hosted in Azure Repos (which | ||
| does not support Git's partial clones, but supports its predecessor, the GVFS | ||
| protocol, which is used by Scalar to emulate the partial clone). | ||
|
|
||
| Since the GVFS protocol will never be supported by core Git, this patch | ||
| series will remain in Microsoft's fork of Git. | ||
|
|
||
| - `run-scalar-functional-tests`: The Scalar project developed a quite | ||
| comprehensive set of integration tests (or, "Functional Tests"). They are the | ||
| sole remaining part of the original C#-based Scalar project, and this patch | ||
| adds a GitHub workflow that runs them all. | ||
|
|
||
| Since the tests partially depend on features that are only provided in the | ||
| `scalar-with-gvfs` patch series, this patch cannot be upstreamed. | ||
Uh oh!
There was an error while loading. Please reload this page.